The format goes:
Code: Select all
{
"_meta": {
"maxChars": {
"welcome": 50
}
},
"en": {
"welcome": "Welcome"
},
"es": {
"welcome": "Bienvenido"
}
}
Code: Select all
DialogueManager.SetLanguage(languageKey);
My key question is how do I set all conversation lines to the localized text language the user selects before the gameplay starts? The option to swap is already given before any dialogue begins.
Here's an example of the keys and values I use in the json file:
Code: Select all
"intro7": "Press the Down Arrow Key to activate Teds cold power.",
"intro8": "Great job! You’ve frozen the little guy! It’s now a solid state slime.",
"intro9": "Look at the Micro Cam.",
To vet my own question... here's my steps (thinking out loud here)
- Load DialogueDatabase
- MainMenu loads
- The user selects a language
- TDS DialougeManager.SetLanguage(languageKey) updates the key (ex: from "en" to "es")
- The DialolgueDatabase or separate solution using Subtitle Text reads the keys and values from language.json
- All dialogue in conversations now displays the localized text read from the .json file provided by the platform's team
- For testing (as per the requirements) if the key's value is "" (blank) it will display no text in the subtitle text
Thanks in advance for your help. Let me know if I should share any more info. Not sure how much I can actually share without having to read the contract though.