1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Modding LocalizedText vs Language_en_US

Discussion in 'CivBE - Modding Help & Mod Creation' started by roadmaster, May 13, 2015.

  1. roadmaster

    roadmaster Chieftain

    Joined:
    Apr 28, 2015
    Messages:
    20
    Can someone explain to me the difference between the two and when your supposed to use one over the other? I have seen uses for both in seemingly the same situations. I'm trying to decide which to use in my mods because they both seem to work the same to me. Is this simply a Modders Preference issue? or is there some point where you would use one over the other?

    roadmaster
     
  2. Ryika

    Ryika Lazy Wannabe Artista

    Joined:
    Aug 30, 2013
    Messages:
    9,395
    I hope I'm not missing something here, but if you mean entering text directly vs using TXT_KEYS, then as far as I know it doesn't really make a difference for the game itself.

    The issue is Multi-Language-Support. If you enter plain text, then you pretty much "force" your mod to use the language you use, while if you use TXT_KEYs it's quite easy to add support for multiple languages later on - including AddIn-Mods that other Authors may create for your mod.

    With that said though... multi-language modding is pretty much non-existent in BE. So unless you yourself plan to add multi-language support it's probably fine to be lazy (and to save time) by just entering text directly. Just be aware that, if for whatever reason you change your mind later, re-doing it "properly" later on will be even more of a pain. ;)
     
  3. roadmaster

    roadmaster Chieftain

    Joined:
    Apr 28, 2015
    Messages:
    20
    Basically I'm looking at how the Game files on my installation do it:

    and then Im looking at the way several mods i've downloaded have done it:

    And I was just wondering what was the difference, they both seem to work fine. I didn't know if one of them was an old way of doing it and they were just keeping backward compatibility or what. I have a partially completed schema and was trying to decide whether or not both were necessary components since I couldn't find any reference to <LocalizedText> in my assets/Gameplay/XML Files. Although since <LocalizedText> does have the desired impact in a Mod Im assuming its in there somewhere.
     
  4. Ryika

    Ryika Lazy Wannabe Artista

    Joined:
    Aug 30, 2013
    Messages:
    9,395
    Oh, dear. And it's so obvious, too. No idea how I could misread that so badly. :D

    But anyway, what I know: LocalizedText is the name of the SLQ-Table (which is what the XML-stuff gets "translated" into) that basically holds all the TXT_KEY-entries that are assigned to the different languages, so if I'm not horribly misinterpreting something, then both methods lead to the exact same end result.

    If I were to make wild assumptions - which I won't, because I wouldn't really know what I'm talking about ... but if I were to make them, then I'd probably think that both are just different ways of organizing the file-structure. The first example doesn't need to repeat the language-tag again and again (which may or may not be a performance-boost when creating a table with 120k+ entries?), but at the same time you're pretty much forced to have all the texts of a language in one block - especially in smaller projects I assume actually being able to list the same text-entries for different languages directly beneath each other would make editing them a bit faster as one wouldn't have to jump around that much.

    But anyway, as I said... wild assumptions. And I'm too tired to actually look for information about that right now. Maybe one of the more experienced guys enlightens us. ;)
     

Share This Page