Add more languages to the Application after deployment RRS feed

  • General discussion

  • hi all,

      In silverlight is any restrcition like we have resource in the application itself? I am using satellite assembiles so that i have resource dll now how can i use in my silverlight application? I can add to xap and update manifiest file when host in IIS. But how can i check in development environment..


    Also after i deployed the application in my production environment how can i add one more language to the application. How the supported culture is updated after deployed?

    Saturday, November 12, 2011 2:01 AM

All replies

  • Hi akhilrajau,

    If you're already familiar with localizing ASP.NET using Resources (.resx) files
    then process of localizing Silvelright application is pretty similar.
    Let's say you start with an original SLV project and at a certain point you
    want to expand it in order to display the content in different languages,
    you can create a resource file for each culture or language you want your
    application to support.
    Silverlight will use the CurrentUICulture of the UI thread to decide which
    resource to select.

    You can have a look at a Silverlight 4 Localization example at following link.


    If this answers your question, please Mark as an answer. Thank you.

    Saturday, November 12, 2011 2:04 PM
  • thanks friend..i have the knowledge in asp.net. There i create seperate  satellite assemblies and add that assemblies into the bin directory with in the specific culture folder. When need new folder i can add in new culture folder. ( i created satelite assemblies using resgen and al tools)

    But in SLP i cant add extenal dll file how can i achive this? can i add resoruce files in the silverlight project only?

    Saturday, November 12, 2011 10:57 PM
  • Hi,

    You can have a the following link:

    Dynamic Localization in Silverlight


    In this code example, the main Silverlight application .XAP contains only a single RESX file
    (Resources.resx) containing strings for
    the default language (English).
    Strings for other languages (French -Resources.fr.resx, Spanish - Resources.en.resx and German - Resources.de.resx)
    live in a separate .XAP named ExternalResources.xap.

    In the example, clicking on one of the language will display content in relative by executing a call to
    LocalizationManager.ChangeCulture, which does the following:

    -Downloads ExternalResources.xap if it hasn’t been downloaded before,
     and sets a flag to prevent it from being downloaded again.
    -Extracts all satellite assemblies from the XAP and loads them into the appdomain
    -Changes the culture by assigning the specified CultureInfo to the CurrentCulture and
     CurrentUICulture properties of the current thread.
    -Fires a CultureChanged event to let you know that the culture has changed.

    My CultureChanged event handler calls UpdateBindings on the ObservableResources object,
    forcing the bindings that provide data to my TextBlock and Button elements to be reevaluated.
    Thus, the UI updates automatically.

    Hope this helps

    Monday, November 14, 2011 5:22 PM
  • Thanks friend. I already read this articles and foillowing this method only. But i confused here only so other languages are automatically updated in the support culture of project manifiest?

    Tuesday, November 15, 2011 8:36 PM