i have an issue in 2:57 , when trying to select the table , it shows me none , eventho i created a string table and filled it edit: I fixed it, I manually downgraded the version of localization package in manifest.json to 1.0.5
If you have, for example, the language buttons (english, spanish, etc.) in the Main Menu scene, will they change the language of the texts in the other scenes of project too?
Thank you for a very useful lesson. Here they have already asked about the compatibility of the script between scenes, but I would like to clarify something - I have LocalizationManager on the initial scene, which works, for the main game scene I also need to add an empty object, bind the script to it, and then how to select text objects in the first scene elements for translation?
Hello, please tell me why I have such an error in this script (switching the language with buttons)? Script\Localozation.cs(21,62): error CS0117: 'LocalizationSettings' does not contain a definition for 'Locales'
Thanks, this was super helpful and straightforward. You explain everything step-by-step. One question: I notice when you run the app it will first display the English text and flag, and then switch to whichever ID you had selected previously. How would you prevent that from happening and instead display the saved ID straight away?
I think that this will not be visible if you use some kind of fade in/out effect. The loading will be done in that time while the screen is black. If that doesn't help you, try to explore if you can change the default language after selecting it. It's just an idea, don't know if it's possible.
@@RootGames I tried to change the .SelectedLocale to the last saved ID right in the Start() method before calling ChangeLocale() and it still displayed ID 0 at first. So what I ended up doing is a variation on what you suggested: - First I disabled the Canvas object in the hierarchy so nothing is displayed at first - Then I declared a "public GameObject canvas;" so we can access it in the script - Then in the IEnumerator, just before the "active = false;", I added "canvas.SetActive(true);" to re-enable the Canvas object and display the buttons, text, and flag. - After saving the script, from the hierarchy I dragged the Canvas object into the "Canvas" slot on the LocalizationManager object. This way any initialization or switching of IDs is done behind the scenes and once the canvas is set active it only displays the ID that was previously saved to PlayerPrefs. I have a feeling Unity either displays ID 0 by default when first displaying the objects, or at the moment the initialization occurs.
Super tutorial! It helped a lot! But I have a quick question, is it possible to display a default text without having to run the app? It would be helpful to choose the right size/settings of the texts
Awesome stuff. Just one thing. I'm trying to select the language with dropdown menu instead of buttons. How am I going to do that? I'd be very pleased if you reply. 🙏
Hi, amazing video. Best localization video I have seen. I do have 1 question. Might be stupid. But does this work for just 1 scene or multiple scenes. So if I select the language here. How does it configure to the other scenes in my project? Thank you
I just played with the localization package when it came out to see possibilities, so all my testing was done in one scene. I would assume that settings are applied to all text that is using the package. If you find out more, please share it in the comments :)
I don't want to use a button in this process. For example, if the user's device is English, the language should be English, if it is Spanish, the language should be Spanish automatically. How can I do this?
Hi, quick question. I've looked all over the web but can't find it. How do I request the Active Locale int ? I seem to only be able to {get} a string. For instance for English the string I get is "English (en)". This has helped me so much, thank you!
So for reference. I need to know which locale id (int) is active, so i can apply a font for Latin / Cyrillic / etc. languages. Right now, I've got it to work like so: void Awake () { for (int i = 0; i < LocalizationSettings.AvailableLocales.Locales.Count; i++) { if (LocalizationSettings.SelectedLocale == LocalizationSettings.AvailableLocales.Locales[i]) { My_function_which_needs_the_locale_as_an_integer(i); break; } } }
Hey, this is an amazing video tutorial. But I still have one question, can you help me? If you use a Localized string event, it is updated even if the object is turned off (or rather, it is updated when it is turned on) But if you use GameObject Localized, then this does not happen, is there any way to do this?
This is a great video, but for Chinese TMP seems to be a big problem. Seems that normal text works fine with Chinese. Is there a way to make it use TMP for English and normal text for Chinese?
I never used enums with the localization package. but in the next part, I will show how to localize dynamic text that uses integers for keeping the score. Maybe that will help you to figure out something.
@@RootGames It's simple. Open a google spread sheet, plop in your text. Use Google A.I. to translate to the languages, read the file, have an index for each column. Much easier than click 25 buttons 50 times before you even touch one text. I cant even remember the 3rd click.
👉 Part 2: ua-cam.com/video/XLv79XcbYXc/v-deo.html
Best tutorial on that subject. Period.
Thanks 😉
I was looking for how to change the language using buttons. Thank you, this is really helpful.
i have an issue in 2:57 , when trying to select the table , it shows me none , eventho i created a string table and filled it
edit: I fixed it, I manually downgraded the version of localization package in manifest.json to 1.0.5
just found out there is solution without downgrade.
Go to Edit>Preferences>Localization> then Un-tick String Search Picker. Problem solved
@@junoxii6181 Thanks so much!
@@junoxii6181 Thanks a lot, you saved mu sanity!
@@junoxii6181 Life saver! Thank you so much!
Thank you so very much. May the Lord bless you always.
cheers mate thank you! your videos taught me exactly what I was looking for. amazing :)
Glad I could help!
Thank you that video helps me so much.
Awesome Tutorial, Thanks!
If you have, for example, the language buttons (english, spanish, etc.) in the Main Menu scene, will they change the language of the texts in the other scenes of project too?
Yes
Thank you for a very useful lesson.
Here they have already asked about the compatibility of the script between scenes, but I would like to clarify something - I have LocalizationManager on the initial scene, which works, for the main game scene I also need to add an empty object, bind the script to it, and then how to select text objects in the first scene elements for translation?
amazing video, ty very much
Thanks for this video! In russian part of UA-cam methods of localization is very bad:) I hope you will go on
Hello, please tell me why I have such an error in this script (switching the language with buttons)?
Script\Localozation.cs(21,62): error CS0117: 'LocalizationSettings' does not contain a definition for 'Locales'
thanks
Thanks, this was super helpful and straightforward. You explain everything step-by-step.
One question:
I notice when you run the app it will first display the English text and flag, and then switch to whichever ID you had selected previously. How would you prevent that from happening and instead display the saved ID straight away?
I think that this will not be visible if you use some kind of fade in/out effect. The loading will be done in that time while the screen is black. If that doesn't help you, try to explore if you can change the default language after selecting it. It's just an idea, don't know if it's possible.
@@RootGames That's one way to hide it. I will try to look further into this and reply here if I find another solution. Thanks for your suggestion!
@@RootGames I tried to change the .SelectedLocale to the last saved ID right in the Start() method before calling ChangeLocale() and it still displayed ID 0 at first.
So what I ended up doing is a variation on what you suggested:
- First I disabled the Canvas object in the hierarchy so nothing is displayed at first
- Then I declared a "public GameObject canvas;" so we can access it in the script
- Then in the IEnumerator, just before the "active = false;", I added "canvas.SetActive(true);" to re-enable the Canvas object and display the buttons, text, and flag.
- After saving the script, from the hierarchy I dragged the Canvas object into the "Canvas" slot on the LocalizationManager object.
This way any initialization or switching of IDs is done behind the scenes and once the canvas is set active it only displays the ID that was previously saved to PlayerPrefs.
I have a feeling Unity either displays ID 0 by default when first displaying the objects, or at the moment the initialization occurs.
@@casachezdoom2588 Did you find another solution? I used awake instead of Start and it did not help me
Best Video Ever
proud to be ur 1000th sub!
Because of that, contact me on Instagram or Twitter to get my Udemy course for free 😊
Super tutorial! It helped a lot! But I have a quick question, is it possible to display a default text without having to run the app? It would be helpful to choose the right size/settings of the texts
Awesome stuff. Just one thing. I'm trying to select the language with dropdown menu instead of buttons. How am I going to do that? I'd be very pleased if you reply. 🙏
Check my tutorial about resolutions, there I show how to choose resolution with a dropdown menu. That might give you an idea how to do it.
Hi, amazing video. Best localization video I have seen. I do have 1 question. Might be stupid. But does this work for just 1 scene or multiple scenes. So if I select the language here. How does it configure to the other scenes in my project? Thank you
I just played with the localization package when it came out to see possibilities, so all my testing was done in one scene. I would assume that settings are applied to all text that is using the package. If you find out more, please share it in the comments :)
Will do 👍
I don't want to use a button in this process. For example, if the user's device is English, the language should be English, if it is Spanish, the language should be Spanish automatically. How can I do this?
pasam sen de cok sey ıstıyorsun
LocalizationSettings -> Locale Selectors. Move the 'system locale selector' to first place.
Hi, quick question. I've looked all over the web but can't find it.
How do I request the Active Locale int ?
I seem to only be able to {get} a string.
For instance for English the string I get is "English (en)".
This has helped me so much, thank you!
So for reference.
I need to know which locale id (int) is active, so i can apply a font for Latin / Cyrillic / etc. languages.
Right now, I've got it to work like so:
void Awake ()
{
for (int i = 0; i < LocalizationSettings.AvailableLocales.Locales.Count; i++)
{
if (LocalizationSettings.SelectedLocale == LocalizationSettings.AvailableLocales.Locales[i])
{
My_function_which_needs_the_locale_as_an_integer(i);
break;
}
}
}
Hey, this is an amazing video tutorial. But I still have one question, can you help me?
If you use a Localized string event, it is updated even if the object is turned off (or rather, it is updated when it is turned on)
But if you use GameObject Localized, then this does not happen, is there any way to do this?
I wouldn't know. It can be a bug. Try to raise an issue on the Unity forum. Unity stuff is really good and responds to possible bugs/solutions.
This is a great video, but for Chinese TMP seems to be a big problem. Seems that normal text works fine with Chinese. Is there a way to make it use TMP for English and normal text for Chinese?
Just use a font that includes chinese characters and make sure you include its Unicode range to the atlas. Look for the subject online.
hi i m mr red! hope u remember me, i lost my account on discord as well as on udemy! wish if I got this course back lol
I remember you 😀
I...... Messed that up in my under-progress Baldi mod.
is it possible to make a this work with a drop down?
Yes
@@RootGames can you possibly show how? or answer with a script, Thank you very much
Does anybody have an issue where the English words randomly disappear when playing? If so how do I fix it?
how i can make this with a dropdown menu?
Thx bro
Good
Is there a way to localize UI toolkit?
When I was making this tutorial, it wasn’t possible. It was in Unity’s plans but don’t know the current situation.
Nice tutorial. But how can i localize an enum value?
I never used enums with the localization package. but in the next part, I will show how to localize dynamic text that uses integers for keeping the score. Maybe that will help you to figure out something.
tip: if (active == true) is equal to if (active)
I know but I write it explicitly so everyone can understand it :)
using System.Collections;
using UnityEngine;
using UnityEngine.Localization.Settings;
public class LocaleSelector : MonoBehaviour
{
private bool _active = false;
public void ChangeLocale(int localeID)
{
if (_active)
{
return;
}
StartCoroutine(SetLocale(localeID));
}
private IEnumerator SetLocale(int localeID)
{
_active = true;
yield return LocalizationSettings.InitializationOperation;
LocalizationSettings.SelectedLocale = LocalizationSettings.AvailableLocales.Locales[localeID];
_active = false;
}
}
Thanks!!!
THX
part 2?
Coming this weekend 😉
Too complicated no thank you. I got lost at minute 3.
ok 😂
@@RootGames It's simple. Open a google spread sheet, plop in your text. Use Google A.I. to translate to the languages, read the file, have an index for each column. Much easier than click 25 buttons 50 times before you even touch one text. I cant even remember the 3rd click.
Thank you very much, very helpful