Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Question How to easily localize UI strings across ALL languages

Discussion in 'Localization Tools' started by angeldevelopment, Apr 1, 2023.

  1. angeldevelopment

    angeldevelopment

    Joined:
    Sep 28, 2022
    Posts:
    247
    I have recently launched a new game, and in one day I received 1000 downloads across different countries. So now I need to translate my UI for 100's of languages. I have downloaded the localization package, and generated locales for EVERY language available (maybe that's a bad move memory wise)

    Every tutorial I see involves setting up a table of strings. For me to set up a table of strings for all my UI across 4, or 10, or 100 languages is not realistic.

    Is there a way to loop through each UI element using GameObject.FindObjectsOfType<TextMeshPro>()
    and translate at runtime using the locals? Am I naive to think that this is achievable?
     
  2. angeldevelopment

    angeldevelopment

    Joined:
    Sep 28, 2022
    Posts:
    247
    Also I cannot click "Create table"
     

    Attached Files:

  3. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,570
    What do you mean by translate at runtime? Use machine translation? I would not recommend this, machine translation, such as google translate will not provide good localization.
    Typically you want to pick a few key languages and localize to them, then add more if there is demand. You don't need to support 100s of languages. See which counties are the most popular and use that to pick a few languages to target.

    For example Spanish and Chinese are popular.
    https://www.marstranslation.com/blog/what-languages-to-translate-your-games

    Then find some professional translators for those languages who can help you localize the game.
    You will need to spend some time extracting the English into string tables. You will then be able to export and import in various formats (Csv, google sheets, xliff) which will help with working with translators.
     
    Last edited: Apr 1, 2023
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,570
    Could you file a bug report? I dont think we have had anyone try and create a table with so many languages ;)
     
  5. angeldevelopment

    angeldevelopment

    Joined:
    Sep 28, 2022
    Posts:
    247
    Well I ran ads for one day and got downloads across the board, pakistan, bangledesh, india:
    It is unrealistic for me to manually localize every button and ui element in a table. Even if machine translation isn't grammatically perfect, I think it makes the most sense to use.

    Even if I manually localize my most used languages, lets say: spanish, english, chinese, I would still want machine translation to handle cases where those languages aren't used. Is there a way to use the google translate api?
     
  6. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,570
    Providing poor-quality translations can harm your relationship with gamers and may result in losing your audience. It's not just about bad grammar; inaccurate translations can convey completely different meanings or fail to make sense at all. Therefore, without a reliable translator, it's impossible to verify the accuracy of machine translations.

    It seems like you're trying to rush things out, but did you take the same approach during the initial game development? Localization should be considered an essential aspect of game development that requires careful consideration, rather than being rushed.

    Consider extracting the text into a string table and then connecting it to a Google sheet to use Google Translate. However, it's recommended that you have a translator review the output to ensure there are no issues. This way, you can avoid any potential misunderstandings or errors that may harm your game's reputation among players.
     
  7. lixi_x

    lixi_x

    Unity Technologies

    Joined:
    May 5, 2021
    Posts:
    9
    karl_jones likes this.
  8. OneManEscapePlan

    OneManEscapePlan

    Joined:
    Oct 14, 2015
    Posts:
    227
    You want to translate in real-time over an API? This is a very bad idea.

    1. You'll get terrible translations like "Main Menu" turning into something like "Primary Food List"
    2. There will be a delay while the translation loads over the internet. The worse the player's connection, the longer the delay. Or the translation may never load if the player loses internet
    3. Battery and data usage will be higher. Players won't be happy if they have limited data and you use it streaming translations from the internet. You could theoretically cache translations locally after the first time they load, but that could end up storing a huge amount of text on the device if you accidentally cache things like "Score: 525" that will change frequently.
    4. You generally have to pay to use this kind of API.
     
    Last edited: Apr 25, 2023
  9. angeldevelopment

    angeldevelopment

    Joined:
    Sep 28, 2022
    Posts:
    247
    Very good points made. Seems like manual translation is the only way.