-
Notifications
You must be signed in to change notification settings - Fork 19
Localization
Add Ribbon XAML(RibbonMarkup.xml) and Localization Files (RibbonMarkup.resx)
For more details about Ribbon XAML, look at MSDN or the Samples mentioned above.
- The localization information for the Ribbon text. The file name must be equal to the Ribbon XAML file
- The Ribbon XAML file
- The Ribbon embedded resource generated by custom build tool
- The Ribbon log file generated by custom build tool
- The custom build tool name to generate *3 and *4
How Localization Works
Ribbon UI information must be defined in the Ribbon XAML file and localization information in the ResX file. The custom tool is searching for "{Resource
" tags in the XAML file and replacing it using information from ResX file. Multiple ..ribbon files are generated - one for each ResX file. All these ..ribbon files have to set to Embedded Resources in the Build Property of your project.
Define localized text inside Ribbon XAML using {Resource:} notation.
Add localized resources to ResX file
Specify the Ribbon UI in the Ribbon control properties
In the properties of the Ribbon control, we must specify the default or neutral ".ribbon" file generated by the RibbonTools build tool (RibbonTools.exe). All “*.ribbon” files must be an embedded resource in your application. You can find them in the folder of your Ribbon XAML file.
Result looks like...
Let's see how the result looks like. In our sample, we have two Ribbon resources: Default and German.
Localized by default culture
Specify culture information
In order to use a localized Ribbon, the application's current culture must be set by changing the CurrentCulture
property of the current thread.
namespace _19_Localization
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Thread.CurrentThread.CurrentCulture = new CultureInfo("de-DE");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("de-DE");
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
Localized by German culture
-
Basics
- Introduction, Background on the windows ribbon
- Basic Ribbon Wrapper Basic .NET wrappers for windows ribbon.
- Quickstart Tutorial
- First WinForms Ribbon Application How to create an empty WinForms application with ribbon support.
-
Working with Ribbon Controls
- Application Menu with Buttons How to use the ribbon application menu.
- Application Menu with SplitButton and DropDownButton How to use the ribbon application menu with ribbon split button and ribbon dropdown button controls.
- Tabs, Groups and HelpButton How to use ribbon tabs, groups and the ribbon help button control.
- Spinner How to use the ribbon spinner control.
- ComboBox How to use the ribbon combo box control.
- DropDownGallery, SplitButtonGallery and InRibbonGallery How to use the ribbon drop down gallery, split button gallery and in ribbon gallery controls.
- CheckBox and ToggleButton How to use the ribbon check box and toggle button controls.
- DropDownColorPicker How to use the ribbon drop down color picker control.
- FontControl How to use the ribbon font control.
- ContextualTabs How to work with ribbon contextual tabs.
- ContextPopup How to work with ribbon context popup.
- RecentItems How to work with ribbon recent items control.
- QuickAccessToolbar How to work with the ribbon quick access toolbar.
- The Ribbon Class How to work with the ribbon class. Methods, Properties, Events
- EventLogger Since Windows 8: Logging ribbon events
- UICollectionChangedEvent How to work with the ChangedEvent in an IUICollection
-
Working with miscellany Ribbon features
- ApplicationModes How to work with ribbon application modes.
- SizeDefinition How to define custom size definitions for ribbon group elements.
- Localization How to localize a ribbon.
- Changing Ribbon Colors How to change the ribbon colors.
- Working with Images How to work with images in the ribbon.
- Use Ribbon as External DLL How to load ribbon resources from external DLLs.
- Wrapper class RibbonItems An auto generated wrapper class from the ribbon markup.
-
Designing, building, previewing Windows Ribbon with RibbonTools
- RibbonTools basics Settings, Command line, ...
- Create a new project Create a WordPad sample project
- Preview the Ribbon
- Specifying Ribbon Commands
- Designing Ribbon Views
- Convert Images to Alpha Bitmaps
-
Modeling Guidelines
-
How to ...