Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Need to select all variants for each texts for localization?

Discussion in 'Localization Tools' started by gokhancnr, Aug 7, 2022.

  1. gokhancnr

    gokhancnr

    Joined:
    Jul 25, 2020
    Posts:
    20
    Hi,

    I have a project having over 20 languages. Some languages will have different fonts and maybe other variants.

    So, do I need to choose all variants for each texts by clicking "Track all changes" over the Localization Scene Controls window?

    I've also tried to have a text with chosen all variants and tried to copy "Game Object Localizer" component and "Paste Component As New" to another texts but it does not working out.

    Thanks in advance.
     
    Last edited: Aug 7, 2022
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,227
    Yes at the moment you do need to set the font for each text item. You can make this easier by making a Text Prefab which has the Font setup with a GameObjectLocalizer. Then you should only need to edit the 1 prefab to make changes.
     
  3. gokhancnr

    gokhancnr

    Joined:
    Jul 25, 2020
    Posts:
    20
    I'm sorry but I couldn't clearly understand it.

    For Text Prefab I think I should follow these steps:

    • In Hierarchy; GameObject > UI > Text-TextMeshPro
    • Click "Track all changes" over the Localization Scene Controls window
    • Drag&Drop the Text-TextMeshPro GameObject into Project Window a folder(such as named with Prefabs)

    Now I have text prefab with GameObjectLocalizer.

    Afterwards, in every place I need a text using I will drag&drop this text prefab into hiearchy.

    Until here... If I made all steps correctly I'm just now struggling with changing Table Entry of Table Reference.


    Yours,
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,227
    Also track the text value. You can then change the table reference when you add the prefab to the scene. It will just be a prefab override. You can right click the Text label and choose to track the value without having to do the track changes method.

    Alternatively you could add a LocalizeStringEvent to the component to handle the text. Right click the component and choose Localize.
     
  5. gokhancnr

    gokhancnr

    Joined:
    Jul 25, 2020
    Posts:
    20
    Both working like a charm!

    I should consider to avoid Override all changes as an old habits, tradition :rolleyes: :rolleyes:
     
    karl_jones likes this.