Thread Tools Display Modes
05-26-13, 06:06 AM   #1
cryangel
A Fallenroot Satyr
Join Date: Aug 2012
Posts: 25
How do I create a Localization file?

Sorry, my English is poor.


Strings-koKR.lua <--- I made a language file.


For Strings-koKR.lua language files
-------------------------------------------------------
if GetLocale() == "koKR" then

Carbonite_Strings = {
["string"] = "문자열",
}
-------------------------------------------------------


and Carbonite.toc file
-------------------------------------------------------
Locales\Strings-koKR.lua <--- added.
-------------------------------------------------------


NxUI.lua
local L = Carbonite_Strings <--- added

It works fine.



but
Carbonite.lua, Carbonite.Nodes , NxQuest.lua etc
local L = Carbonite_Strings <--- added

error

help me plz
 
05-26-13, 10:59 AM   #2
Rythal
Featured Artist
Featured
Join Date: Aug 2012
Posts: 1,458
the acelocale stuff is just a placeholder for now, I haven't actually implemented it yet.

If you look in carbonites locale directory there's one large file that does all the current translations possible, which is where you'd need to add krKR strings.
 
05-26-13, 04:19 PM   #3
cryangel
A Fallenroot Satyr
Join Date: Aug 2012
Posts: 25
Thank you for your answers.

I have to translate a map name is translated as all the menus and npc and objective.

NxUI.lua file is
On the first line, add local L = Carbonite_Strings
L ["String"] has been translated by using the menu.

but Carbonite.Nodes , NxQuest.lua etc file is error

I would like to Quest Tracking Window and addon-menu how to translate.

local L = LibStub ("AceLocale-3.0"): GetLocale ("Carbonite", true)
local L = LibStub ("AceLocale-3.0"): GetLocale ("Carbonite.Quest", true) .. Etc seems to be due.



In previous versions, I put the following code in a file, the first line was used.

Code:
local L = Carbonite_Strings
local function _NPC(s) if not NPC_Strings and Quest_Strings then return s end return NPC_Strings[s] or Quest_Strings[s] or s end 
local function _TRANS(s) if not Carbonite_Strings then return s end return Carbonite_Strings[s] or s end 
local function _Quest(s) if not Quest_Strings then return s end return Quest_Strings[s] or s end 
local function _Travel(s) return string.gsub(s, "(%w+ to )(.+)", function(a,b) local t=NXTravel[a] or a local n=NXlMapNames[b] or b return t..n end) end 
local function _MapName(name) return string.gsub(name, "(%w[^:]+)", function(s) return NXlMapNames[s] or s end) end
local function _TaxiName(name) if name then local _, _, subzone, zone = name:find("(.+), (.+)") subzone = subzone or name return (NXlTaxiNames[subzone] or subzone)..(zone and ","..(NXlTaxiNames[zone] or zone) or "")end end
local function _Tax(s) return string.gsub(s, "(.-), (.+)", function(a,b) local t=_NPC(a) or a return t..",".._TaxiName(b) end) end
Attached Files
File Type: lua Localization.lua (172.9 KB, 1020 views)
 
05-26-13, 04:34 PM   #4
cryangel
A Fallenroot Satyr
Join Date: Aug 2012
Posts: 25
Quest Title Translation files
Attached Files
File Type: zip Quest_locales.zip (1.31 MB, 380 views)
 
05-26-13, 04:39 PM   #5
cryangel
A Fallenroot Satyr
Join Date: Aug 2012
Posts: 25
NPC NAMES Translation files
Attached Files
File Type: zip NPC_names.zip (2.98 MB, 369 views)
 
 

WoWInterface » Featured Projects » Carbonite » Carbonite Archive » How do I create a Localization file?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off