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. Dismiss Notice

Question Insert data into Localization Tables

Discussion in 'Localization Tools' started by palak_unity333, Jul 3, 2023.

  1. palak_unity333

    palak_unity333

    Joined:
    Feb 7, 2022
    Posts:
    4
    Apologies if this a repeat question or stupid in general!

    Hello, I'm just getting started with the localization package. I want to add localization to my project and automate the process, so I'm trying to integrate the package with my project. I'm retrieving data from Google sheets using my current process. I have the keys and the language data in Unity. Now, I want to assign this data to a particular localization table (currently String) so it can be picked for different languages.

    Is there a direct way to do this that I'm missing?

    Thanks
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,820
  3. palak_unity333

    palak_unity333

    Joined:
    Feb 7, 2022
    Posts:
    4
    Hey, I'm using Google Sheets API to fetch data from Google Sheets. We already have the method in place, can I continue with that? If not, can the Google sheets extension way be done using script? I'm aiming to automate the entire thing, not sure how possible that'd be using Unity Editor/UI.
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,820
  5. palak_unity333

    palak_unity333

    Joined:
    Feb 7, 2022
    Posts:
    4

    Thanks a lot! That's helpful.

    Another thing that I'm stuck at:
    I'm following this link - https://docs.unity3d.com/Packages/com.unity.localization@1.4/manual/Scripting.html#editor
    I want a different string table collection for each level with same languages, i.e. levelwise string table collections. But I'm getting the error -"Exception: Can not add new table. The same LocaleIdentifier is already in use.".

    Is this possible or would using a single table collection be better?
     
  6. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,820
    That sounds like the table already exists for that table collection. You just need to get the table instead of adding a new one. Then you can make changes to it.
     
  7. palak_unity333

    palak_unity333

    Joined:
    Feb 7, 2022
    Posts:
    4
    Ah I was suspecting the locales. Thanks a ton for steering me the correct path!
     
    karl_jones likes this.