Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question How to swap localization string table via script upon build?

Discussion in 'Localization Tools' started by herra_lehtiniemi, Sep 5, 2022.

  1. herra_lehtiniemi

    herra_lehtiniemi

    Joined:
    Feb 12, 2017
    Posts:
    114
    I'm using a same platform code to build several apps. I would like to switch the string table upon build so that on one build, app name would be "MyTableID/app_name_ios" and on second build it would be "MyTable2ID/app_name_ios".

    Is there a way to "swap the string table" but keep the keys (like app_name, app_display_name etc)? Alternatively I can also put all the app names into one table and use different keys for different apps, from the same string table so I would simply switch "MyTableID/app_name_app_1" to "MyTableID/app_name_app_2"

    How do I do this?
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    6,865
  3. herra_lehtiniemi

    herra_lehtiniemi

    Joined:
    Feb 12, 2017
    Posts:
    114
    I would need to switch the string table (or change string table values) from the script, because the app is multilingual. Changing displayname wouldn't work in multiple locales.

    Do you happen to know if I can either switch the string values inside the app metadata, change the active string table values by key or switch the table "underneath" the info so that the keys remain the same, but refer to a different table?