User avatar
ttermeer-reboundcg
Topic Author
Posts: 31
Joined: 13 Sep 2019, 11:10
Contact:

Conditional Resources Dictionaries

08 Jun 2026, 11:16

What would be the best way in Unreal C++, to have dynamic resources dictionaries?
Since #2380 is still pending, we like to have a have different dictionaries loaded based on the current language in order to have the proper font (and custom font style to match).
 
User avatar
sfernandez
Site Admin
Posts: 3363
Joined: 22 Dec 2011, 19:20

Re: Conditional Resources Dictionaries

10 Jun 2026, 11:42

You can have different dictionaries for each language and dynamically merge them into the Application Resources when the selected language changes.

Assuming you merge the dictionary with the font definitions in the first position you can do something like this:
Noesis::ResourceDictionary* app = Noesis::GUI::GetApplicationResources();
Noesis::ResourceDictionaryCollection* merged = app->GetMergedDictionaries();
merged->RemoveAt(0);
merged->Insert(0, Noesis::GUI::LoadXaml<Noesis::ResourceDictionary>(pathToSelectedLanguageDictionary));
Could something like this work for you?

Who is online

Users browsing this forum: No registered users and 14 guests