How do I localize on the client in Silverlight?

I am trying to perform custom localization of each client in Silverlight and am running into problems. I tried using custom cultures (en-US-c1, en-US-c2, etc.), but found that this does not work because the culture must exist on the client. Is there a good clean way to do this?

+3
source share
1 answer

You will need to write an isolated storage user culture

Values ​​are saved as a key / value pair:

// Create an instance of IsolatedStorageSettings.
private IsolatedStorageSettings userSettings =
    IsolatedStorageSettings.ApplicationSettings;

// Add a key and its value.
userSettings.Add("userCulture", "en-US-c1");

// Remove the setting.
userSettings.Remove("userCulture");

Just the default is something reasonable, and you will need an option that allows the user to choose their culture.

0
source

Source: https://habr.com/ru/post/1749330/


All Articles