CustomTranslation.asi

From FIFA Manager Modding Wiki
Jump to navigation Jump to search
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.

General idea[edit | edit source]

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 format[edit | edit source]

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 mode[edit | edit source]

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 mode[edit | edit source]

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 symbols[edit | edit source]

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.

Restrictions[edit | edit source]

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

Example[edit | edit source]

MyCustomText.tr

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

CustomText.png

Links[edit | edit source]

Download 1.1.3