Search Unity

Modding

Discussion in 'Localization Tools' started by Korindian, Dec 17, 2018.

  1. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    Is the design of this localization system taking modding the localization files into account?

    For example, serializing the text tables to json, xml, or csv, and then being able to load those files at runtime, allowing users to modify translations and text?

    The top assets like I2 Localization and others support this, and I did this in my own localization solution. It would be nice to see Unity support this as well. After looking at the documentation, it didn't look like this is possible yet, unless I missed something.
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Yes this is something we planned from the start. In the future addressables will support file formats other than Asset bundles such as Json etc. We will use this to add support for modding.

    At the moment it is possible to modify the localization data after a build but it requires asset bundles instead of text files.
     
    Korindian likes this.
  3. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    Great to hear. When you say "in the future", are we talking about one of the early 2019 releases for Addressables being able to load Json? I'm wondering whether I should start using this preview version as I'm working on my UI right now. I know things change, but just looking for a rough idea, thanks.
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Oh no don't start using it yet. Just for preview
    During 2019 I would expect but it's dependent on some Addressables development
     
    Korindian likes this.
  5. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    Hi, I tried to test the Localization package, but it's not showing up in the Package Manager currently, even with "All Packages" checked and "Show preview packages" enabled.

    Some more questions after perusing the docs:

    1. Is it possible to reorder the terms in the various tables? Or sort the keys alphabetically at least?

    2. When the functionalities of loading json/csv/etc. files at runtime is added, can we control exactly when it gets loaded, and be notified after all async loading is done? How about control over when the localization system is initialized?.

    3. Do the locale settings handle converting of decimal numbers, e.g. 1.25 to 1,25?

    Thanks.
     
  6. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    1: You can sort alphabetcially. We dont support manual sorting at the moment although ill make a note of this request.

    2: Initialization of the localization system is done using preloaded assets at the moment, so its done at the start but this does not include loading tables(unless the option to preload is enabled). You can control when tables are loaded as we are using the addressables system so either we will attempt to load them when a call is made for the asset the first time(on demand) or you will also be able to ask for tables to be loaded by name(not exposed in the API yet).

    3: Yes a locale has a CultureInfo property which can do conversion for many types of data (currency, date, time, decimal etc). We are also experimenting with named placeholders to let you have further control over the formatting in the actual string. Something like this: https://github.com/axuno/SmartFormat/wiki

    Thanks for the questions and feedback!
     
    Korindian likes this.