View Single Post
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)