Localization after UI loaded

4 posts, 0 answers
  1. Michael Evans
    Michael Evans avatar
    31 posts
    Member since:
    Mar 2010

    Posted 06 Jan 2011 Link to this post

    I'm wondering if there is a way to force a control to update its localization strings after the UI is loaded.  Our application has the ability to change languages at any time.  If the user brings up a page and a RadGridView and RadDataPager are on it, and then change language, the localization strings don't change, but it works fine if the language is set before the page is loaded.  I've tried calling InvalidateArrange() and InvalidateMeasure() but that does not seem to work.  Has anyone found a way to do this?
  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 06 Jan 2011 Link to this post

    Hi Michael Evans,

    You may take a look at our demo for Localization - each time you select one of the RadioButtons on the right, the language is changed. Basically, the idea behind is that the UI elements are recreated on updating the language. 

    Best wishes,
    Maya
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  3. Michael Evans
    Michael Evans avatar
    31 posts
    Member since:
    Mar 2010

    Posted 06 Jan 2011 Link to this post

    Thanks, that seems to work, although my grid is pretty complicated so it's a bit of a hassle to ensure it's reloaded correctly.
    Any way you'd consider adding a method that just changes the localization and leaves everything else the same, for a future version?
  4. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 06 Jan 2011 Link to this post

    Hi Michael Evans,

    Actually, changing the language at runtime is not as easy as it may seem and it is not not quite possible to implement such a feature. As everyone has particular settings and visual elements defined in the grid, this functionality cannot become a generic one.
    Another possible approach for achieving the desired behavior is to implement a navigation logic using the Silverlight Navigation Framework. Thus you may "map" to the correct page with its specific localized strings. When setting the UriMapping, you may define a 'parameter' {culture} that will be responsible for separating the different pages and passing the corresponding culture.  


    All the best,
    Maya
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
Back to Top