Public static void Add(string key, string value) Public static string GetLocalisedValue(string key) Public static Dictionary GetDictionaryForEditor()
LocalisedRU = csvLoader.GetDictionaryValues("ru") LocalisedEN = csvLoader.GetDictionaryValues("en") Public static Language language = Language.English Public class LocalisationSystem : MonoBehaviour *** Assets\Scripts\LocalisationSystem.cs(121,9): error CS0120: An object reference is required for the non-static field, method, or property 'TextLocaliserUI.Start()'*** I created an event in which the current language is checked and changed, but for the language to change in the game in real time, I need to execute an event from another script, at this point I get an error: However, I ran into the problem of creating a button that changes the language during the game. I made a localization system according to the lesson from So what should i do considering that my scripting skills are very low at the moment? It's defined as protected virtual inside Unity LocalizationSettings class so i cannot access it. The problem is that a method LocalizationSettings.SelectLocale() which probably (i'm not sure) should switch current locale is inaccessible due to its protection level. LocalizationSettings.SelectLocale(identifier) Public class LanguageDropdown : MonoBehaviourÄebug.Log("Selected language: " + identifier)
But how to switch it in game outside editor? I've tried to create a dropdown with a following script attached: Now i can switch language upon playing the game in editor.
Now i'm trying to learn how to implement a localization into game using official unity localization more ol less succesfully assigned different string value for different languages using localization tables.
I'm a newbie unity user who has never written a code before starting to learn unity couple weeks ago. How to make it work considering that my scripting skills are very low at the moment? I've tried making a smart strings in localization table like theseįrom my script but this way it's just displaying the first part of the string from localization table How to make localization for this string without splitting it into 2 different objects (one for "Score:" string and another for score value). But there is a string in my game which before implementing localization was defined like this along with the other stuff inside GameManager.cs: Now i'm trying to learn how to implement a localization into game using official unity localization have no problem using it for simple strings.