HomeIndex

Translation Commands

The translation code was never fully finished for Delores and was hastily added right before releasing this source. Apologies if there are rough edges.
All text that needs to be translated should be wrapped with the SAY(0,"Hi there!") or TEXT(0,"cardboard box") macros depending on if the text is said by a character or just displayed on the verbs or UI.
sayLine(delores, "The commodore 64 is my favorite computer.")
Becomes
sayLine(delores, SAY(11876,"The commodore 64 is my favorite computer."))
This is best done by wrapping all text and leaving the id as 0, then creating a python script that goes through and finds all SAY(0,"...") assigning a unique number and saves them to a .tsv file. The ids must start at 11000.
The .tsv file has four columns::
id text en loc
Note that is a .tsv (Tab Separated Values) file, not a .csv (Comma Separated Values) file.
It's best if this python script is stable and can be run multiple times as you add new text without renumbering the text ids.
Switching languages can be done by adding an option in Options.dinky and using that to load different Translation files.
Most of the fonts in Delores don't include much more than ASCII glyphs. You can supply your own TTF fonts with the characters you need or you can use http://www.pentacom.jp/pentacom/bitfontmaker2/ to upload and modify The included fonts.
If you want your translations to be compatible with other mods, or even make it back into the release game, don't renumber the line ids and make alterations only in the 'text' labeled column of the .tsv file.
When working on a translation in the .tsv file, resist the urge to fix typos in the English text (the native text in the 3rd column of the .tsv file, labeled 'en'). These changes should be made in the source (.dinky file) and then a new/updated extraction should be done. This is because the English text comes from Translations_en.tsv and not the 'en' labeled column from (for example) Translations_de.tsv, from which the player will never see the edits.
The 'en' labeled column, 3rd column of the .tsv file, is for text reference only.
If you're going to add new lines, number them from 20000 and up so they don't conflict with the existing lines from the core game.
Have fun!
useTranslation(language)
Change languages
This is called with a 2-letter language code: en, de, fr, it, etc. Technically they don't have to be 2-letter codes but for for consistency they should be when possible. You could create piglatin files if you wanted.
There is a special text id of 10000 that should be used to hold the text of your language in your language.
English English
or
Deutsch German
The id 10001 should be used to provide a short description of the translation for display in the UI. This can be useful in distinguishing between two translation in the same language.
Traduction par Google Translation by Google
Text id's 10000-11000 should not be used as they are reserved for the system and engine.
If you switch languages in the middle of playing, any text already on the screen will not change until it needs to be redrawn.
Passing null will turn off all translation and use the text in the source code.
TR(text)
Translates a raw line of text
The text must have line ids in it to be translated. Line ids are a five digit number follow by a : and then the original (English in this case) text.
After the macro expands, the code sayLine(SAY(11879,"I love making games! Do you?")) emits sayLine("11879:I love making games! Do you?")
A marker of 0 mean the text has not been extracted to the .tsv file yet.
Text that begins with a ^ won't be translated.
Turning on Translation Markers in the Options panel will produce good information for debugging.