It is quite easy to translate the user interface of EasyQuery.NET components into another language. Our help describes how to do it via satellite assemblies which is the standard way of localization for .NET components.
However there is another way: more easy and faster one.
All our main components (like DataModel
, QueryPanel
or QueryColumnsPanel
) contains special Texts
property which is actually a map of all strings used by this component. You can change those properties one-by-one (through Texts.Put
operation) or simply load a .properties
which contains all translations.
Here are more detailed instructions:
.properties
files in the \res\EasyQuery\ sub-folder of EasyQuery.NET installation folder.EQCoreMessages.properties
will become EQCoreMessages_PT.properties
for Portuguese language. After that just translate all text messages at the right part (after = symbol) in each row of all new .properties
files.Example:
DataModel1.Texts.LoadFromFile("EQCoreMessages_PT.properties"); QueryPanel1.Texts.LoadFromFile("EQWebMessages_PT.properties");
For Silverlight components the approach is similar but slightly different.
Instead of changing text resources in each component you can access all of them at once using special LocResources
static class.
Here is an example:
DataModel1.Texts.LoadFromFile("EQCoreMessages_DE.properties"); LocResources.LoadFromFile("EQSLMessages_DE.properties");
Please note, that for non-visual components (such as DataModel) you still should use the old way of localization (through Texts property).
Discussion