Localization for Syncfusion Tools Silverlight Controls | Syncfusion Blogs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (174).NET Core  (29).NET MAUI  (207)Angular  (109)ASP.NET  (51)ASP.NET Core  (82)ASP.NET MVC  (89)Azure  (41)Black Friday Deal  (1)Blazor  (218)BoldSign  (14)DocIO  (24)Essential JS 2  (107)Essential Studio  (200)File Formats  (66)Flutter  (133)JavaScript  (221)Microsoft  (119)PDF  (81)Python  (1)React  (100)Streamlit  (1)Succinctly series  (131)Syncfusion  (917)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (51)Windows Forms  (61)WinUI  (68)WPF  (159)Xamarin  (161)XlsIO  (36)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (8)Business intelligence  (55)Button  (4)C#  (149)Chart  (131)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (63)Development  (630)Doc  (8)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (40)Extensions  (22)File Manager  (7)Gantt  (18)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (507)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (43)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (12)Scheduler  (52)Security  (3)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (31)Solution Services  (4)Spreadsheet  (11)SQL  (11)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (387)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (594)What's new  (332)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)

Localization for Syncfusion Tools Silverlight Controls

Introduction

Localization is the process of providing controls in different cultures, allowing end-users to set their own culture. In the globalized world, you cannot just ship software with only one language; you have to be in a position to provide an application with localized culture support. In Essential Studio Volume 3, Syncfusion Silverlight Tools controls ship with complete support for localization, which makes your life easier by being able to localize your entire application.

Here we will discuss how you can enable localized support for your application with Syncfusion controls.

Getting Started

Here are the primary things to do for localizing Syncfusion Silverlight controls in your application:

  1. Add resources for different cultures with localized content.
  2. Add the supported cultures.
  3. Assign the current UI culture to the application.

 

Step 1 – Add Resources

To localize Syncfusion Silverlight controls, you need to create resource files with the proper naming convention for each culture. The following steps need to be done when localizing strings for your culture.

  1. Add Resource (.resx) files in the Resources folder for different cultures. (Here, .resx files in different cultures or invariant cultures should be placed in the Resources folder of your project).
  2. Resource files should be named AssemblyName.CultureName.resx and AssemblyName.resx for invariant cultures.

In step two, AssemblyName is the Syncfusion Silverlight control assembly name and CultureName is the culture code of the resource you want to show in the UI. If your conversion is only for an invariant culture, the .resx file does not need to contain a culture suffix. 

For example …

  • Syncfusion.Tools.Silverlight.fr-FR.resx – Is the French resource for Syncfusion.Tools.Silverlight assembly.
  • Syncfusion.Tools.Silverlight.resx – Is an invariant culture resource for Syncfusion.Tools.Silverlight assembly.

     3. Apply the localized content in the Syncfusion.Tools.Silverlight.fr-FR.resx file for each string variable, as given below, for localizing the Ribbon Control Customization dialog and context menu.

Name

Value

Add

Ajouter

Cancel

Annuler

ChooseOtherCommandsFrom

Choisir les commandes d’autres:

CustomizeQuickAccessToolbar

Personnaliser la barre d’outils Accès rapide …

DefaultRibbonBarCaption

Ruban Bar

DefaultRibbonButtonCaption

Ruban Button

DefaultRibbonTabCaption

Ruban Tab

DefaultRibbonTitle

Ma demande

MinimizeRibbon

Réduire ruban

MoreCommands

Commandes en savoir plus …

OK

OK

QATPopupHeader

Personnaliser la barre d’outils Accès rapide

QATShowAbove

Voir la barre d’outils accès rapide au-dessus du ruban

QATShowBelow

Voir la barre d’outils accès rapide sous le ruban

Remove

Supprimer

Reset

Remise

Note: This table shows the necessary string variable names that are needed only for this post. You may need to apply many other string variables based on the control feature. Complete information will be published with the 2010 Volume 3 documentation.

Step 2 – Add Supported Cultures

It’s very important to add supported cultures in the sample application project before running the application.

  1. In the Solution Explorer, right-click your sample application project and choose Unload Project from the context menu. Notice that the project will be unavailable.
  2. Right-click the project again and select the Edit SampleProjectName.csproj option.
  3. In the .csproj file, find the <SupportedCultures></SupportedCultures> tags. By default, the tags will be empty. So, add the cultures that you want to be supported, separating each with a semicolon if there are many.

For example: <SupportedCultures>fr-FR</SupportedCultures>

     4. Save the project and reload it by right-clicking on the SampleProjectName.csproj. Then choose Reload SampleProjectName.csproj.

Step 3 – Assign Current UI Culture to the Application

By default, the current culture will be “en-US,” which you can check from System.Threading.Thread.CurrentThread.CurrentUICulture.

Now you can change CurrentUICulture as you want, as seen below.

Here, CurentUICulture should be set before IntializeComponent in your StartUp page (MainPage.xaml.cs) or you can set it in App.xaml.cs in the Application_Startup event.

public MainPage()
{
   System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("fr-FR");
   InitializeComponent();
 }

Or in the App.xaml.cs file …

 private void Application_Startup(object sender, StartupEventArgs e)
 {
   System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("fr-FR");
  this.RootVisual = new MainPage();
   }

Output

 

clip_image002

Ribbon Control for Invariant Culture

 

clip_image004

French Culture Assigned as Current UI Culture for Ribbon Control

 

clip_image005

Customization Dialog for Invariant Culture

 

clip_image006

French Culture Assigned as Current UI Culture for Customization Dialog

Conclusion

The same pattern is applicable to all other Syncfusion Tools Silverlight controls, and other packages will have this support added on or before the 2010 Volume 4 release. We welcome your valuable feedback about this feature to enhance support for Volume 3, which is scheduled for mid July.

Tags:

Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed