Hi,
I just tried this control and within 3 minutes, I customized it to get the perfect image editor for my project. My only issue is about localization (in french).
I can directly edit header and tools labels within XAML but some tools open a custom side-pane with non translated controls. (i.e. Draw tools => brush size, brush color). I don't know why this component is not localized. I tried several things like "Language="fr-FR" in XAML or even C#
System.Threading.Thread.CurrentThread.CurrentCulture =
new
System.Globalization.CultureInfo(
"fr-FR"
);
System.Threading.Thread.CurrentThread.CurrentUICulture =
new
System.Globalization.CultureInfo(
"fr-FR"
);
From what I understand, localized strings are in Telerik.Windows.Controls.dll so they should be charged. Even more weird, when I run the WPF Demos, I can success to run the Localized version of this control (the demo where you can choose between english, german, french)
Thanks for any help
ps: I have the very last version of UI for WPF (2016 R3)
info: I'm running it in a VSTO for Office. Not sure that changes anything but I prefer to give all information
7 Answers, 1 is accepted
sorry for multipost, I cannot edit a previous post?!!
I found that some tools are localized but not the "Draw" one. What are the solutions to localized it ?
We are aware of these missing translated resources in our resource files for localization. You can follow the status of the issue in our portal.
You can build custom localization dictionary for ImageEditor using the localization keys in the style of the ImageEditor. Or you can copy the Strings.fr resx file, use it for building a custom localization and just add the missing translations. The mentioned file is shipped witht he source code of our controls.
Regards,
Petar Mladenov
Telerik by Progress
Hi Petar,
Thanks for your answer. Sorry but could you please give more guidance.
You can build custom localization dictionary for ImageEditor using the localization keys in the style of the ImageEditor
In the template, I cannot access nor define the labels for the panel. I just have this in Xaml
<
tools:DrawTool
/>
I don't see how I can override it nor define custom localizations keys for the settings panel. Am I missing something ?
Regarding the second way with "Strings.fr". It would require to define a "fake" langage and add it to my application and force the fake culture for the component, isn't it ?. I don't like it that much because it means that it may broke something during future update of the telerik suite. I don't want to take new string.fr.resx file every release to apply each change. Am I wrong ?
Third solution: waiting for the fix BUT:
My customer (bank) says it can wait for Telerik WPF 2017 but can you guaranty that these missings labels will be fixed by then ? I need to choose a components suite now and if the next version will not fix that, I cannot recommand them to use Telerik as the recommended third-party suite.
Thanks a lot for your help.
Please check out the Localization article for RadImageEditor. You can inherit our LocalizationManager and override just the missing strings you need. For the rest - base class should be called, just like in the code snippet in the article. The full list of localization strings can be found in the SDK Localization Demo.
We hope this approach is suitable in your scenario.
Regards,
Petar Mladenov
Telerik by Progress
Hi Petar,
Thanks for the guidance, within two minutes I was able to fix 2/3 of the issue, indeed, one of the label does not seem to implement localization manager even if it is declared in the resources files (the original one from your example). In fact, it is because the XAML created by default (drag and drop) and SDK example seem to have an error in the resource
ImageEditor_DrawTool instead of expected ImageEditor_Draw
public
override
string
GetStringOverride(
string
key)
{
switch
(key)
{
//case "ImageEditor_DrawTool":
// return "Pinceau";
case
"ImageEditor_Draw"
:
return
"Pinceau"
;
case
"ImageEditor_DrawTool_BrushColor"
:
return
"Couleur"
;
case
"ImageEditor_DrawTool_BrushSize"
:
return
"Taille"
;
}
return
base
.GetStringOverride(key);
}
Any my issue is solved for now. thanks for your help and have a merry Xmas Petar
Thanks for letting us know about the issue. We will update the demo accordingly.
Regards,
Petar Mladenov
Telerik by Progress