WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Carbonite Archive (https://www.wowinterface.com/forums/forumdisplay.php?f=158)
-   -   How do I create a Localization file? (https://www.wowinterface.com/forums/showthread.php?t=46553)

cryangel 05-26-13 06:06 AM

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

Rythal 05-26-13 10:59 AM

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.

cryangel 05-26-13 04:19 PM

1 Attachment(s)
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


cryangel 05-26-13 04:34 PM

1 Attachment(s)
Quest Title Translation files

cryangel 05-26-13 04:39 PM

1 Attachment(s)
NPC NAMES Translation files


All times are GMT -6. The time now is 03:36 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI