View Single Post
05/30/14, 07:47 AM   #13
Halja
 
Halja's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 111
Originally Posted by Sharlikran View Post
That is good advice. Since you probably know more then I, does this page seem to you like it would explain it well enough? Do you think it's missing what you were trying to explain about a "lookup tables"? What do you think? I wont need to remove, insert, or sort the table because it will remain constant.
Unless I'm not completely reading this thread, you can vastly simplify your code by only loading the language file(s) the client has currently running. You do this in your manifest by using the $(language) variable. At run-time the launcher will pick. That way you are also using less memory, your search index can be in your native language, and the code does not need all the if else on language anymore. The value will be the expected text based on the language.

Instead of three line in the manifest like
Code:
Localization/HarvestMapData-en.lua
Localization/HarvestMapData-de.lua
Localization/HarvestMapData-fr.lua
It would be:
Code:
Localization/HarvestMapData-$(language).lua
Based on what the cVar("Language.2") hold, one of your three originally files will be loaded. This is how ZOS is doing the localization for the most part on strings.
Hope this help,
--halja
  Reply With Quote