Hey, I got Dialogue System since a will now... but not really go trought
Now i'm going to do something with, I try to integrate language system from Localization package.
Everything work fine... hum or not.
I've tryed to take out something with your menu framework to make a custom setting menu like changing post process volume or manage weather quality etc... but for the language it a bit more complicated lol
Sometime when I load a game (start in french ) I back it set back to english (all others things are still in french using localization, english is the default language) -- I think it can come from the localization setting under the display setting from dialogue manager it's not set to fr but to FR-fr (in localization table it's fr) but not sure.
Other things is that, can we show the alert title in french too ? to here it's a script command that exectue and show it or the increment on destroy who use [var=enemiesKilled]/5 killed] for alerte.... but in private hart dialogue it's set to " Variable["Alert"] = "Mission: Get the Launch Codes" "
Any chance to have it in the current selected language too ?
Sorry for my english, I'm french ahaha..
Best regards. Pixchel.
[Solved] Show alerte title in current language
[Solved] Show alerte title in current language
Last edited by Pixchel on Sat Jul 06, 2024 2:51 am, edited 1 time in total.
Re: Show alerte title in current language
Hi,
1. Assign a Text Table asset to the Dialogue Manager's Display Settings > Localization Settings.
2. In this Text Table, add a field "Mission: Get the Launch Codes" and translate it.
3. If you're using the Localization Package integration, you can use it to translate the Text Table asset.
The Dialogue System will use the field in the text table that matches the alert text.
1. Assign a Text Table asset to the Dialogue Manager's Display Settings > Localization Settings.
2. In this Text Table, add a field "Mission: Get the Launch Codes" and translate it.
3. If you're using the Localization Package integration, you can use it to translate the Text Table asset.
The Dialogue System will use the field in the text table that matches the alert text.
Re: Show alerte title in current language
Thanks for your reply... I think for this problem
For the option, your answer is veryhelpfull, and I want to know how to refresh all dialogue system field when we swap the language. I mean in the quest tracker, it's not updated immediatly when I change en to fr, or fr to en using this code :
in option.cs
I need to speak with a npc or open dialogue quest window
Best Regards, Pixchel.
was about the language table who have 3 field (default, en, fr) peraph I use only default and fr (in option, index are 0 - 1) but don't know why, I removed en to keep default and fr, but when I restart unity, en is back...Sometime when I load a game (start in french ) it set back to english (all others things are still in french using localization, english is the default language) -- I think it can come from the localization setting under the display setting from dialogue manager it's not set to fr but to FR-fr (in localization table it's fr) but not sure.
For the option, your answer is veryhelpfull, and I want to know how to refresh all dialogue system field when we swap the language. I mean in the quest tracker, it's not updated immediatly when I change en to fr, or fr to en using this code :
Code: Select all
public virtual void SetLanguageByIndex(int index)
{
if (DialogueManager.DisplaySettings.localizationSettings.textTable == null) return;
var language = string.Empty;
var languageList = new List<string>(DialogueManager.DisplaySettings.localizationSettings.textTable.languages.Keys);
if (0 <= index && index < languageList.Count)
{
language = languageList[index];
}
var uiLocalizationManager = FindObjectOfType<UILocalizationManager>();
if (uiLocalizationManager == null) uiLocalizationManager = gameObject.AddComponent<UILocalizationManager>();
uiLocalizationManager.currentLanguage = language;
uiLocalizationManager.UpdateUIs(language);
Localization.language = language;
DialogueManager.SetLanguage(language);
LocalizationSettings.SelectedLocale = LocalizationSettings.AvailableLocales.Locales[index];
PlayerPrefs.SetInt(languagesPrefsKey, index);
}
I need to speak with a npc or open dialogue quest window
Best Regards, Pixchel.
Re: Show alerte title in current language
Hi,
DialogueManager.SetLanguage() should update everything. But, if not, try calling DialogueManager.SendUpdateTracker() afterward.
DialogueManager.SetLanguage() should update everything. But, if not, try calling DialogueManager.SendUpdateTracker() afterward.
Re: Show alerte title in current language
Thanks, it worked very well
Re: Show alerte title in current language
Happy to help!