Open main menu
ASI Plugin
CustomTranslation.asi
Version 1.1.3
Author Dmitri
Games 11m.png 12m.png 13m.png

The CustomTranslation.asi is used to add or replace the text in the game and in the Editor.

Contents

General ideaEdit

The main idea is to use custom text without editing original game files, such as Translations.huf, DatabaseEditor.txt, DatabaseEditor.de.txt, and others. You can add new text by creating translation files, which should be placed somewhere in the plugins folder, for example:

\plugins
    MyText1.tr
    \myfolder
        MyText2.tr
    

Translations file formatEdit

The translation file should be a UTF-8 (with BOM), UTF-16 (Little-Endian or Big-Endian; with BOM) or ANSI text file with .tr extension.

There are 2 possible ways to add or replace translation entries with .tr files - Multi-language mode and Single-language mode (both modes can be combined in one translation file).

Multi-language modeEdit

In this mode, each line starts with the translation key name (or translation key hash), and followed by translation entries. Translation key and translation entries for each language should be separated with | symbol.

TRANSLATION_KEY_NAME|Translation English|Translation French|Translation German|Translation Italian|Translation Spanish|Translation Polish
HASH#3357347033|Translation English|Translation French|Translation German|Translation Italian|Translation Spanish|Translation Polish

If the entry for language is not present, it will be set to the first non-empty entry.

Single-language modeEdit

In this mode, all entries for specified language (or languages) should be placed under the [LANGUAGE] section, where LANGUAGE is a language ID (for example: eng, ger. Such IDs are used in the game's locale.ini file.

; multi-language mode, set text for all languages
TRANSLATION_KEY_NAME_1|Text for all languages
; start single-language mode for language
[rus]
TRANSLATION_KEY_NAME_2|Translation For Russian Language
; start single-language mode for language
[pol]
TRANSLATION_KEY_NAME_2|Translation For Polish Language
; start single-language mode for languages
[eng,ger]
TRANSLATION_KEY_NAME_2|Translation For English and German Languages
; back to multi-language mode
[]
HASH#3357347033|Translation English|Translation French|Translation German|Translation Italian|Translation Spanish|Translation Polish

Special symbolsEdit

Some characters can't be used inside the translation entry (the | character is used to separate entries, so it can't be used inside the entry), and you need to use a replacement for such characters.

Character(s) Replacement Description
{HS} space
\r\n {BR} newline
| {PIPE} vertical line
\t {TAB} tab
{ {{} left curly bracket
} {}} right curly bracket

It's possible to put comment lines inside translation files. Such lines should be started with ; or # character.

RestrictionsEdit

It's not possible to change original copyright text. Please pay respect to game creators and don't change their credits.

ExampleEdit

MyCustomText.tr

IDCSTR_LANGUAGES_100|Klingon|Klingon|Klingonisch|Klingon|Klingon|Klingoński
IDS_PRESS_ANY_KEY|{{}My custom text {PIPE} here{}}

 

LinksEdit