Search Unity

Question Make text display different strings from different localizations

Discussion in 'Localization Tools' started by nashxra, Jul 23, 2022.

  1. nashxra

    nashxra

    Joined:
    Jan 16, 2019
    Posts:
    2
    Hello,

    I'm trying to wrap my brain around localization, tables, etc. - had a look through the docs and googled around a bit to see how folks were using it in their own projects.

    Forgive me if I missed this - I'm new to this side of Unity!

    I was wondering if it's possible to take UI text and change its string from one locale to another via script - i.e. you had three languages in your game (Cebuano, English, Tagalog) and wanted to change one specific piece of text from "breakfast" (ENG) to "almusal" (TAG)

    something like:
    example.text = (other locale);


    Originally, I wrote script to do this where I manually typed the different translations, then I learned about localization tables and that I could import a dictionary via .csv so figured this might be easier.

    unity.png

    Thanks/salamat :)
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,300
    nashxra likes this.
  3. nashxra

    nashxra

    Joined:
    Jan 16, 2019
    Posts:
    2
    karl_jones likes this.
  4. Bonbonita

    Bonbonita

    Joined:
    Aug 4, 2022
    Posts:
    3
    As another option, you can manage all of your content in localization software which integrates with the unity localization package. You can eliminate most manual work for localizing strings and assets by doing that. You can set up auto-sync of all untranslated and translated content with Unity and localization software, so you don’t need to manually import all of your content. Here is a short article on how you can integrate your unity project with TMS.