Charm bar with language issue


  • After I use override function to change the application language from "en-us" to "zh-tw", and call "WinJS.Resources.processAll()", everything is OK except charm setting view, I mean the setting list view. I really dynamically set the title of each settings:

    var account = WinJS.Resources.getString("account");
     WinJS.Application.onsettings = function (e) {
    e.detail.applicationcommands = {
                "Account": { title: account.value, href: "/pages/settings/account/account.html" },


    Is anyone know how to reload this charm setting view, or other way to make it correctly shown?

    Wednesday, October 10, 2012 1:48 AM

All replies

  • You must have language specific resource files .

    So in your solution create a folder "strings" create sub folders for the languages you are supporting like "en-US". Then create a file "resources.resjson" in each language folder.

    Put the keys : values in the following format: in each of the file. Make sure filename is same in each folder and keys in the files are same as well.

     "Key1": "Value1",


    In the manifest file set the default Language to your desired one, e.g en-US.

    And then in your code change the line as:

     "Account": { title: WinJS.Resources.getString("Key1").value, href: "/pages/settings/account/account.html" },

    Run the app. and then 

    Go to control panel -> All control Panel Items -> Language.

    Make sure the language which is the desired one is at the top.

    restart the app (not a must for sure).... you should be able to see the changes.

    Hope it helps

    Arindam Basu

    Wednesday, November 14, 2012 12:21 PM