MathPlayer has support for 13 languages besides English (quality varies...). MathPlayer's rule files are open and can be used as a start for a MathCAT translation. The easiest to programmatically convert are the unicode.tdl files. These are also probably the most painful thing to translate for people helping out with translation.
The "tdl" format is special to Design Science, but thankfully the unicode.tdl files have an entry on a single line and so are relatively to pick apart for conversion. Here's an example from the German translation:
char ? (unicode == 0x2223) => string{text="teilt";};
char ? (unicode == 0x2224) => string{text="teilt nicht";};
These want to turn into:
- "∣": [T: "teilt"] # 0x2223
- "∤": [T: "teilt nicht"] # 0x2224
This seems like a relatively easy python program to write.
The attached MathPlayer rules directory (rules.zip) has subdirectories for each language and in each is a unicode.tdl file. The result should go into a newly created directory for the language in Rules/Language/xx/unicode.yaml where xx is the language code for the translation.
Bonus points 👍
- The translators didn't translate everything. For those Unicode codepoints not translated, interface with google translate and insert the translation. You can compare the
en version of unicode.tdl to see if something has been translated. There might be a few that are the same because the same words are used in the translation. That could be a complication...
- Read in MathCAT's English
unicode.yaml and unicode-full.yaml files and if any Unicode char is missing in the translation, add them to the output of the translation. If '1' is not done, use the key t:; if the translation is done, use the key T;.
- Split the file into two files: the most common chars go in
unicode.yaml and the others in unicode-full.yaml.
MathPlayer has support for 13 languages besides English (quality varies...). MathPlayer's rule files are open and can be used as a start for a MathCAT translation. The easiest to programmatically convert are the
unicode.tdlfiles. These are also probably the most painful thing to translate for people helping out with translation.The "tdl" format is special to Design Science, but thankfully the
unicode.tdlfiles have an entry on a single line and so are relatively to pick apart for conversion. Here's an example from the German translation:These want to turn into:
This seems like a relatively easy python program to write.
The attached MathPlayer rules directory (rules.zip) has subdirectories for each language and in each is a
unicode.tdlfile. The result should go into a newly created directory for the language inRules/Language/xx/unicode.yamlwherexxis the language code for the translation.Bonus points 👍
enversion ofunicode.tdlto see if something has been translated. There might be a few that are the same because the same words are used in the translation. That could be a complication...unicode.yamlandunicode-full.yamlfiles and if any Unicode char is missing in the translation, add them to the output of the translation. If '1' is not done, use the keyt:; if the translation is done, use the keyT;.unicode.yamland the others inunicode-full.yaml.