Open Source Cross-Platform Game Programming

While it’s possible to simply take the first direct dictionary translation of each possible word, I’d like to make sure that the translated experience is at least a little more cohesive than that. Sometimes this means breaking with the original meaning of an English construct and choosing a translation that’s more appropriate in context. Furthermore sometimes the way a foreign language itself is written or spoken can create awkward translations.

General Notes and Process

Throughout the code, a convention is used where a localized version of a method, keyword, name, etc is simply the english word with the two-letter locale prefixed to it in uppercase. For example, a function named myFunction may have a Japanese translation of JPmyFunction. This means that a translation has not been made yet and one is needed. Feel free to change these, without hesitation.

If the current translation doesn't make much sense or could be better, please also create a pull request, but include a brief explanation why. If there's quite a few that need to be changed, it may be best to reach out to me directly so I can possibly get a consensus with the original translator. I myself am not fluent with any other language, so please be patient, as I'm probably not the best judge.

"I'm not comfortable with GitHub"

That's okay. I still want your help. Please just contact me through any other means, such as emailing the mailing list.

"Won't making changes break the demo projects?"

Yes. Feel free to update those with your changes, but don't fret too much about it, though. I will (quickly) follow up each update with the necessary corrections.

"The language I know isn't listed yet"

Please let me know which language you'd like to see support for, and I'll likely add it. I don't want to spread this project thin, so for now, I'm only adding languages based on the current help available and sticking to 12 or so major world languages.

As time goes on, I'll be happy to add more with less restriction.

Updating core language keywords

For core language keywords (if/while/enum/switch/etc), literal accuracy is not a high priority, or a priority at all. The English words for these are loosely related to their actual behavior but were likely originally chosen for their brevity, and for most languages (particularly non-European ones) there is no direct translation anyway. Choosing a literal translation of the word "for" would likely be detrimental. With a loose definition in mind, choose a word that mostly makes sense, but is short and easy to type.

The string table for these are located in the Localization/Language/ directory, in the keywords.txt file in the corresponding locale directory. For example, here's the one for Spanish.

Updating library translations

Each of the directories in the Libraries directory is a separate library. Within each is a directory called embed. For example, here's the embed directory for the JSON library. This contains the Crayon source code for the library that the user imports when they import the library, which is where the @localized annotations exist. Many of these localizations are currently set to the english version with the locale prefix (such as ES). This indicates that there is no current translation and one is needed. Please feel free to create a pull request to change these. If you are updating a translation that has already been made, please include a brief explanation why it should be changed. If there are quite a few that need to be changed, please reach out via one of the contact methods at the bottom of the page, such as the mailing list.

If a class or method does not have @localized annotations on it, it is likely because it is not a method meant to be used publicly. Leaving these as English is okay.

Specific language considerations

I will update these lists as more issues are encountered.

Spanish

  • Be aware of standalone gendered adjectives. For example, the new keyword was not translated directly as nueva or nuevo, as this would depend on the gender of the object you’re creating. For this reason crear was used instead. For libraries, most methods and classes are either noun or verb oriented, and so this usually isn’t an issue, but something to be aware of.

Japanese

  • Use Katakana if it is truly the most natural option. The goal isn’t to completely abandon English, but rather provide the most natural experience for real speakers of Japanese.
  • For verbs, use plain non-past form. Don't use keigo.