Thoughts on Localization
Since FuzzyDIYCE is going to have a GUI, we are going to need to think about localizations (i.e. language translations) for the GUI itself.
There are several ways we could implement this, but I think the easiest would be to have the game load the appropriate language file(s) at add-on load. If a different language is desired, this can then be loaded once the FuzzyDIYCE settings are loaded. We can get RoM to load the desired language file by using a special token within the add-on's
.toc file.
The game recognizes a few special tokens when it deals with
.toc files. For language localization, we can use
$language and this will be replaced with the current two to four letter language identifier the game uses (e.g. "enus" for US/Canada English, "eneu" for UK English, "ru" for Russian, "de" for German, etc).
So all we need to do is create a bunch of files for each possible language, and have the game load the correct one. As I can't speak/write most of the languages possible, I'll just put copies of the US/Canada locale in all the other languages and let others create the appropriate translations.
For FuzzyDIYCE, I'll create a sub-folder called
locale that will contain a sub-folder for each language named by that two to four letter locale identifier and put all the required language files in there.
So the folder structure would look something like this:
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
+Interface
|
+Addons
|
+FuzzyDIYCE
|
+locale
|
+de
+eneu
+enus
+ru
[i]... more language folders[/i]
|
So to load a language file called
translations.lua, the
.toc entry would then be:
|
Source code
|
1
|
locale/$language/translations.lua
|
So now all we need to know is what are all the possible language translations. Looking through the
.fdb files (yes, I'm a bad boy

), we can see all the following language IDs (probably not all are used or needed, but hey...)
|
Source code
|
1
2
3
|
ae aus cn de eneu enme enus es esus
fr id jp kr my nl ph pt ro
ru sa sg th tr tw vn
|
Some of these languages may require a right to left text, not sure how or even if I want to deal with that.