Skip to content

Conversation

Deterous
Copy link
Member

Can't seem to figure out what's wrong, @mnadareski hope you can see in the changes tab what my idea is for adding language support. Maybe you're able to figure out how to implement this idea (no need to dev on my test branch).

I also have an idea for adding a little drop down in the UI menu bar. It's not wired in, but the idea is that UI language option shouldn't be hidden away in Options window because that requires navigating to it (in English).

More info:
https://learn.microsoft.com/en-us/windows/apps/develop/platform/xaml/xaml-resource-dictionary

Implementation for changing UI languages (when wired into the ComboBox):

public void ChangeLanguage(string languageCode)
{
    var dictionary = new ResourceDictionary();
    switch (languageCode)
    {
        case "EN":
            dictionary.Source = new Uri("../Resources/Strings.xaml", UriKind.Relative);
            break;
        case "한글":
            dictionary.Source = new Uri("../Resources/Strings.ko.xaml", UriKind.Relative);
            break;
        default:
            dictionary.Source = new Uri("../Resources/Strings.xaml", UriKind.Relative);
            break;
    }
    Application.Current.Resources.MergedDictionaries.Add(dictionary);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant