This is a migrated thread and some comments may be shown as answers.

localized component?

19 Answers 131 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Julien
Top achievements
Rank 1
Julien asked on 29 Jul 2010, 10:41 AM
Hi!

I'm currently using the GridView component. But I see that the text above(Drag a column header and drop it here to group by that column) doesn't seems to change depending of the current localisation.

I've to do a fully multilanguage interface, how can I change this text?

Thank you :)

19 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 29 Jul 2010, 12:38 PM
Hello Julien,

 Please check this demo for more info.

Best wishes,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Julien
Top achievements
Rank 1
answered on 26 Jan 2011, 09:04 AM
Hi,

Can I have an example of file loaded here "LocalizationManager.DefaultResourceManager = new ResourceManager("Telerik.Windows.Examples.GridView.Localization.English", Assembly.GetCallingAssembly());" ?

(it's not column name localization which interest me, but the "Click here to insert", ...

Thank you
0
Maya
Telerik team
answered on 26 Jan 2011, 10:11 AM
Hello Julien,

The localization files for the default English language, German, Spanish and French are predefined and come together with the assemblies for the controls. If you want to create one of your own, you may take a look at our online documentation for a reference. Furthermore, I am sending you a sample project illustrating how you may define a Resource file on your own and use it as the default one in your application. 
On the other hand, if you want to predefine just a string, you may create a simple class CustomLocalizationManager that inherits the default one and override this particular string:

public class CustomLocalizationManager : LocalizationManager
    {
        public override string GetStringOverride(string key)
        {
            switch (key)
            {
                case "GridViewAlwaysVisibleNewRow":
                    return "MyOk";
            }
            return base.GetStringOverride(key);
        }
    }

public MainPage()
        {
            InitializeComponent();
            LocalizationManager.Manager = new CustomLocalizationManager();
        }


All the best,
Maya
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Julien
Top achievements
Rank 1
answered on 26 Jan 2011, 10:15 AM
Yeah, I just want to use theses predefined localization, but I've to set which one they should use sometimes. How can I do this? application wide if possible?
0
Maya
Telerik team
answered on 26 Jan 2011, 10:46 AM
Hello Julien,

In order to provide you with an accurate solution, I would need a bit more details about the exact scenario you want to accomplish. When exactly do you want to use the predefined localization and when do you want to change it ? Do you want to change dynamically the languages used ?
 

Best wishes,
Maya
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Julien
Top achievements
Rank 1
answered on 26 Jan 2011, 11:00 AM
Sure:
We have a program in which the user can select the language he wants to use, so the language we use is not in all case the language of the environnment.

The user can change the language through a menu. 

Actually, everything is working, except telerik component, which stays in the environnment language, so I wish I ask:

"Hey telerik components, try now to use the language XYZ if you have a translation for it, otherwise use the default localisation(english)".

I hope my scenario is clear enough :)
0
Maya
Telerik team
answered on 26 Jan 2011, 12:47 PM
Hi Julien,

Generally, you may take a look at our demo of Localizing RadGridView that demonstrates changing the language at runtime. The basic idea is that the element changing the language is outside the main view and once a selection is made, the grid is recreated with the chosen resource language file. 

Kind regards,
Maya
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Julien
Top achievements
Rank 1
answered on 26 Jan 2011, 02:25 PM
Yeah, I've done that, but I've absolutely no idea of what I should put in there:
LocalizationManager.DefaultResourceManager = new ResourceManager("Telerik.Windows.Examples.GridView.Localization.English", Assembly.GetCallingAssembly());

How can I do to don't specify them and use default en, fr, es, ... localisations?
0
Julien
Top achievements
Rank 1
answered on 28 Jan 2011, 10:14 AM
Did you found any answer?
0
Maya
Telerik team
answered on 28 Jan 2011, 05:32 PM
Hello Julien,

The mechanism in the demos is slightly different as an invocation to the required resources assemblies is required. However, this is not necessary in a regular application. I am sending you a sample project illustrating how you may change the language at runtime.
   

Kind regards,
Maya
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Julien
Top achievements
Rank 1
answered on 31 Jan 2011, 04:51 PM
Hi,

I'm already changing the current culture of the thread and the current UI thread, but I can't replace the current content, I've a lot of view, and from where I've the master window, I cannot know if my children(which contains Telerik UI components) are editing some data, and if they are, I will loose data. And like this I will lose a lot of process time to recreate all my UI components. It's really not an optimal and acceptable solution.

Julien
0
Maya
Telerik team
answered on 31 Jan 2011, 06:21 PM
Hello Julien,

Another possible approach may be 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. 

Kind regards,
Maya
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Julien
Top achievements
Rank 1
answered on 31 Jan 2011, 10:34 PM
It's a wpf application, not silverlight
0
Maya
Telerik team
answered on 01 Feb 2011, 03:12 PM
Hi Julien,

Please excuse me for the misunderstanding. As the target platform is WPF, you may implement the supported Navigation and the Frame class similarly to the example to in the sample I previously attached.
Let me know if you need any further assistance or a sample project.  

Best wishes,
Maya
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Julien
Top achievements
Rank 1
answered on 24 Feb 2011, 08:04 AM
But I've already a whole application, I can't change the system of navigation of my application now only to change the culture of your component!

0
Maya
Telerik team
answered on 28 Feb 2011, 04:30 PM
Hi Julien,

The idea behind the suggested approaches is to recreate the UI once the language has been changed. Generally, any appropriate for your particular scenario solution needs to implement this basic requirement and update the whole view with the new language. Otherwise, that change will not be visible and the string resources will not be translated.

 

Regards,
Maya
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Julien
Top achievements
Rank 1
answered on 01 Mar 2011, 07:45 AM
Is only text, it should be bindable!

I'm currently using a simple library for all my text and I only need to ask to change locals. If a free-open-source solution provide this kind of language change, I think you can do better than reload all components, I've something like 200+ components, we create them at launch because it takes a lot of times, so it is just impossible to recreate them on the language change, reload all data, make again all bindings, ... It will makes us weeks of work only to change a language...

And you guaranted me that I can change easily the language as in your demo...
0
Julien
Top achievements
Rank 1
answered on 15 Mar 2011, 03:07 PM
hello?? Any update?
0
Maya
Telerik team
answered on 17 Mar 2011, 08:36 AM
Hi Julien,

As mentioned previously, you may either benefit from the Navigation supported by WPF or recreate the controls you want to be localized. So, if the target control is RadGridView, you may recreate only it. The basic idea is to update to UI. 
 

Greetings,
Maya
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
General Discussions
Asked by
Julien
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Julien
Top achievements
Rank 1
Maya
Telerik team
Share this question
or