String from translation containing %include%

Discussion in 'Modding' started by Przemek_kondor, Jan 29, 2018.

  1. Hi,
    I'm trying to log some units' names:
    var sid : String = "guardcavalrysax";
    var unitName : String;
    _misc_GetUnitNameBySID(sid, unitName); 
    // or just Log(GetLocaleTableListItemByID('units', sid))
    but some units ids have no plain translation but reuse other keys using include command, e.g.:
    then what in the log file I see:
    instead of translated text.

    Is there a way to resolve these inclusions and get final text?

    Thanks in advance
  2. Wralth

    Wralth Active Member

    Translations are in the locale files
  3. I know, I use them above but for some some keys (e.g. "guardcavalrysax") it doesn't give me proper translation because in translation file there is no plain "Saxony Cavalary guard" but "%include(units;cavalryguard)%" (some reference to other key). For keys having plain translation (e.g. for "reiter") it works.
  4. Wralth

    Wralth Active Member

    Well you could harcode your changes in yourself

    Either you use an include macro or you just write it out lul
  5. Looks like all the %includes are eventually resolved after game has fully initialized.
    I was logging the translations too early( upon game start) and early logs are broken but later are fine.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice