Here I am talking about translating the interface and the texts on the cards, NOT the images.
Wagic supports several languages, with the following limitations:
- for Latin 1 languages, only Ascii is supported. This means you need to replace letters such as "é" into "e", or "ç" into "c", and so one
- For Non Latin 1 languages, currently only Japanese and Chinese are supported, but this is ONLY because we don't have fonts for other languages. If you are a designer/dev and can add a font to support your own language, please feel free to discuss, or ask if you need help (you need to be a bit technical savvy)
Taking these limitations into account, here is how you do that translations:
Wagic has a Res/lang folder, in which you will find several text files. Each language has 2 text files: xx.txt and xx_cards.txt. For example, fr.txt and fr_cards.txt
xx.txt contains the translations for everything, including card names and card types/subtypes, but NOT card texts. This is due to size and legacy reasons. xx_cards.txt contains the translation of the description text of cards.
Res/lang/xx.txt
the file xx.txt always starts with a comment that is actually meta data used by the Game, to display the language in the language selection menu:
Code: Select all
#LANG:Francais
Comment start with a "#"
Code: Select all
#this is a comment
Code: Select all
english text=translated text
Code: Select all
your turn=votre tour
In the cards text translation file, we use
Code: Select all
english card name=translated description text
Code: Select all
Abbey Matron={W}, {T}: La Mere abbesse gagne +0/+3 jusqu'a la fin du tour.
How to know the english strings to translate?
If you are translating to a new language, jut take one of the existing translation files as an example.
If you are updating an existing translation, it gets more complex.
On windows, you can play the game in your language for a little while, then check Res/lang/missing.txt. This file should contain a list of the strings that are missing a translation. More "manually", you can simply play the game and see what's missing. Most of the time, the english wording is what you will want to use. This might get complex when the string is dynamically generated (for example with numbers in there...), in this case, the string to translate contains percentage symbols, etc... ("stufff %i stuff"). In that type of scenario, either use the missing.txt file, or dig in the code, or try to guess