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. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Official Localization System

Discussion in 'Open Projects' started by gabagpereira, Oct 5, 2020.

  1. gabagpereira

    gabagpereira

    Joined:
    Jan 21, 2019
    Posts:
    23
    Hi,

    Since I haven't found any thread or card on this topic, I'd like to suggest the implementation of a localization system in the game, so multiple languages are supported.

    There's a great tutorial on how to implement one very easily, and I've actually tried it in my own project and it works:


    This is a good way to show that this is a "worldwide" project and, therefore, it supports other languages and not only English.

    Since I am from Portugal, I can provide localization in Portuguese.

    Translators from other languages are welcome to provide their own localization.
     
    Rallix likes this.
  2. Neonage

    Neonage

    Joined:
    May 22, 2020
    Posts:
    236
  3. cirocontinisio

    cirocontinisio

    Unity Technologies

    Joined:
    Jun 20, 2016
    Posts:
    884
    Yes, that's the idea. We would like to avoid Preview packages for now, but the localisation package is close to being released, so we'll see. Let me ask!
     
    erdostamasa and Rallix like this.
  4. gabagpereira

    gabagpereira

    Joined:
    Jan 21, 2019
    Posts:
    23
    MaximilianPs likes this.
  5. Neonage

    Neonage

    Joined:
    May 22, 2020
    Posts:
    236
    upload_2020-10-7_19-5-50.png
     
  6. gabagpereira

    gabagpereira

    Joined:
    Jan 21, 2019
    Posts:
    23
    Well, that's good news, I suppose. But it's still a preview package, right?
     
  7. DFT-Games

    DFT-Games

    Joined:
    Jun 24, 2010
    Posts:
    449
    Kuthcer and MUGIK like this.
  8. CloodStool

    CloodStool

    Joined:
    May 9, 2020
    Posts:
    3
    Sound designer here, if we do multiple languages I could gather some friends to record dialogue lines in french!
     
    cirocontinisio and Neonage like this.
  9. fastFox2

    fastFox2

    Joined:
    Aug 7, 2020
    Posts:
    8
    I'm from German, so I can translate the texts into German.
     
    cirocontinisio likes this.
  10. NicknEmart

    NicknEmart

    Joined:
    Sep 9, 2019
    Posts:
    46
    I like the idea, but ImHo we should stick to written dialogue. You being a sound designer means you probabily know how to get good audio quality and stuff, and that's good, but I'm afraid it isn't enough. Unless you and your friends are all good actors (which could be, I'm not assuming anything) the performance will likely be pretty bad, and bad acting is far worse than no acting at all. And it's no just a matter of performing, but also of chosing the right voices for the characters (also not as easy as it sounds).
    And assuming that we can do all this, that's just ONE language. Repeat for how many languages we want to translate the game into.

    Again, feel free to disagree with me on this, but I don't think we should take this path. Written text is a medium just as valid as voiced dialogue, at least for the scope of this game (if we wante to portray powerful emotions like regret or love a good acting choice might make the difference, but I don't think that this is the case). I think that just some "Hey" 's and "Hi" 's when approaching or leaving the characters like in BoTW will do :)
     
  11. Rallix

    Rallix

    Joined:
    Mar 17, 2016
    Posts:
    139
    I'd also love to see the game support multiple languages, and I'll most likely offer help later (unless the amount of text becomes unreasonable). I'd be careful about voice acting, too; unless it's planned better than ‘I could gather some friends’ and it's made sure the voices really fit the characters, just like NicknEmart said. If that can't be done, no voice acting is absolutely fine, too.

    About this; it's quite common to voice only the "main" one or two languages, and have subtitles available for the rest, so this specifically wouldn't be a big issue.
     
  12. derera199

    derera199

    Joined:
    Aug 7, 2019
    Posts:
    1
    I can help with the texts in Spanish.
     
    cirocontinisio likes this.
  13. CloodStool

    CloodStool

    Joined:
    May 9, 2020
    Posts:
    3
    @NicknEmart ah, I assumed there was spoken dialogue for the english version, I must have misunderstood. In that case I completely agree!
     
    NicknEmart likes this.
  14. Victor_Savitskiy

    Victor_Savitskiy

    Joined:
    Sep 14, 2020
    Posts:
    4
    I am ready to help with the translation into Russian.
     
    cirocontinisio likes this.
  15. Harsh-NJ

    Harsh-NJ

    Joined:
    May 1, 2020
    Posts:
    315
    I am from India, can translate to Hindi
     
    cirocontinisio likes this.
  16. circa94

    circa94

    Joined:
    Aug 26, 2014
    Posts:
    4
    I've wrote earlier a localization system where we were able to write all the strings in a google spread sheet and exported it as csv. Then put the csv as a resource in Unity and the system was parsing it. By attaching a component to each Text Control and assigning the specific key, the text was then replaced by value of the selected language.
    This is maybe something i can offer to contribute :)
     
    NicknEmart likes this.
  17. Victor_Savitskiy

    Victor_Savitskiy

    Joined:
    Sep 14, 2020
    Posts:
    4
    It sounds pretty well. The google spreadsheet easy way for many peoples to participate in project localization.
     
  18. noisytnk

    noisytnk

    Joined:
    Aug 19, 2020
    Posts:
    1
    I can help translating into Chinese, both Mandarin and Cantonese!
     
    changstevenn and BrettHuang like this.
  19. javimtib92

    javimtib92

    Joined:
    Aug 15, 2020
    Posts:
    7
    I can help with the texts in spanish too along with @derera199 :)
     
  20. iMakega

    iMakega

    Joined:
    Apr 12, 2020
    Posts:
    3
    Rather than google spreadsheet, how if we:
    1. make the default English string file in a specified folder for localization
    2. from that English localization file, we can make a different file for any language localization
    3. then we can input it to the game, better if the filename is the language localization id.
    Let me know what you think about my idea. I'm ready for the Indonesian localization.
     
  21. shuttle127

    shuttle127

    Joined:
    Oct 1, 2020
    Posts:
    183
    Per the last live stream, we’re using the localization package now, is this necessary anymore?
     
  22. Smurjo

    Smurjo

    Joined:
    Dec 25, 2019
    Posts:
    296
    The localization package can also handle textures, I was counting on it for the boots on the cooking festival (hoping people might come up with plays on words in other languages, especially French).
     
    ChemaDmk likes this.
  23. BrettHuang

    BrettHuang

    Joined:
    Oct 21, 2020
    Posts:
    18
    Hi everyone,

    I am trying to make a little contribution to the localization system about Font Localization

    Here is the idea:

    The problem:

    I added the locale “Chinese(Simplified)(zh)” then I added the Chinese line and Chinese flag to the tables. The Chinese characters are missing in TextmeshPro because of font missing:
    upload_2020-12-16_22-35-42.png

    So I download a Chinese font from Google font, and create the Textmesh Pro font asset (dynamic) and assign it to the TextmeshProUGUI, we have this:

    The Chinese font downloaded:
    upload_2020-12-16_22-36-58.png

    The result:
    upload_2020-12-16_22-37-10.png

    The Chinese words shows but the other fonts changed too, which it’s not what we want.

    (To be continued..)
     
  24. BrettHuang

    BrettHuang

    Joined:
    Oct 21, 2020
    Posts:
    18
    The Solution:

    Since we are using the localization package, we should localize the font according to the game language.

    Here are the steps:

    1. Create a font asset table.
    upload_2020-12-16_22-38-25.png

    2. Create the entry with the key ‘font’ and assign different font to different languages.
    upload_2020-12-16_22-38-47.png

    3. Go to TextmeshProUGUI, right click and hit “Localize String And Font” button. By doing this, two components will be added to the gameobject. One for string localization and the other for font.
    upload_2020-12-16_22-40-31.png

    By default, everything on the component “LocalizeTMProFontEvent” is already set up. It automatically finds the table entry with the name key “font”(so make sure you set the key ‘font’ at the previous step)

    The only thing we need to set up is the string entry. Here I will choose the ‘beach’.
    upload_2020-12-16_22-44-19.png

    4. Final result:
    upload_2020-12-16_22-41-45.png


    So my little contribution contains two scripts:

    A monobehaviour script for the component “Localize TMPro Font Event”
    An Editor script for the right click context menu “Localize String And Font”

    Is it good to create a pull request like this?
    I am not too experienced so please let me know how can we improve this!

    Thank you!
    Brett
     
  25. Smurjo

    Smurjo

    Joined:
    Dec 25, 2019
    Posts:
    296
    Certainly localizing the font is a good thing. We might have difficulties to find a font that works for all the possible scripts, like for example arabic.

    But actually I like the playful font that you have in your error more for our game. It's intended to be a fun game, not an official letter from the tax office or something.
    Are we free to use the it from copyright point of view?
     
  26. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,721
    Thats an interesting approach :)
    We do have a solution for the Localization package to changing fonts which we will be showing later today https://twitter.com/unity3d/status/1334860055829680135?s=19
    It will also be recorded.

    Our solution is called Localized Property Variants and supports changing any property including the rect transform :)

    Although for your timeline, taking your approach would be best as its already available.
     
    Last edited: Dec 17, 2020
    Rallix likes this.
  27. BrettHuang

    BrettHuang

    Joined:
    Oct 21, 2020
    Posts:
    18
    It's just from GoogleFonts so I think they are all open source fonts.

    upload_2020-12-17_10-49-17.png
     
  28. cirocontinisio

    cirocontinisio

    Unity Technologies

    Joined:
    Jun 20, 2016
    Posts:
    884
    Interesting, I didn't know about this possibility. Another one of those things that the package does right which I never thought about, but make a lot of sense once I hear of them.

    Thanks for the long explanation, @BrettHuang!

    We're not unleashing localisation just yet but you can open a PR if you want, but I would suggest to wait a little. Especially now that we're on the holiday break, we might do this in January or so.

    But I totally agree we should think of different fonts for different languages. In fact, we should start choosing them and thinking about the look of the UI, independently of localisation.
     
    BrettHuang and karl_jones like this.
  29. ysfbkrcn

    ysfbkrcn

    Joined:
    Nov 24, 2019
    Posts:
    1
    How can we watch record? I followed link in tweet and register to zoom but zoom says " You can't watch. No permission".
     
  30. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,394
    Sarai and karl_jones like this.
  31. erlemaitre

    erlemaitre

    Joined:
    Oct 30, 2018
    Posts:
    24
    Hello everyone,
    I need some help with the Localization package. I used it to create a very simple text translated in English and French (en, en-GB, en-US, fr). But I don't understand how I can use the locale selectors in the settings to automatically select French at launch (my system is in French). Each time I launch the game, the language is English, even with the SystemLocaleSelector. These are my settings:
    LocalizationSettings.png I would like to use the CommandLineLocaleSelector, but I have no idea about how to insert the argument dynamically (and what argument to give). And I don't understand why the SystemLocaleSelector does not returns French.
    Could you please help me ? :)
     
  32. cirocontinisio

    cirocontinisio

    Unity Technologies

    Joined:
    Jun 20, 2016
    Posts:
    884
    Hey @erlemaitre, is this about Open Projects or more generally about the package?
     
  33. erlemaitre

    erlemaitre

    Joined:
    Oct 30, 2018
    Posts:
    24
    This is only about the package, I guess I'm not in the right thread? I only found this one talking about the Localization package.
     
  34. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,721
    What language does `CultureInfo.CurrentUICulture;` return on your machine? Is it the same as the French Locale?

    If you want to use the command line you need to pass `-language=fr` when you start the game.
    As a last resort you could just change the Specific Locale Selector to French and drag it to the top so its the first one used.

    You can direct general localization questions to this part of the forum https://forum.unity.com/forums/localisation-tools-previews.205/
     
    cirocontinisio likes this.
  35. erlemaitre

    erlemaitre

    Joined:
    Oct 30, 2018
    Posts:
    24
    Thank you, I created a new thread in the correct forum to answer. Sorry for asking here! And good luck to all of you working on this open project!