// Codes in localizer class file internal class localizer : ILocalizationProvider { public string GetLocalizedString(CultureInfo culture, string name, object ctrl) { #region Localization switch (name) { #region MessageBoxAdv ///<summary> ///OK Button in Spanish Language ///</summary> case ResourceIdentifiers.OK: return "De acuerdo"; ///<summary> ///Cancel Button in Spanish Language ///</summary> case ResourceIdentifiers.Cancel: return "Cancelar"; ///<summary> /// default ///</summary> default: return string.Empty; #endregion } #endregion } //Codes In Form1.cs LocalizationProvider.Provider = new localizer(); //MessageBox show MessageBoxAdv.Show("Metro Theme Anpassung", "Das ist Syncfusion MessageBoxAdv Control", System.Windows.Forms.MessageBoxButtons.OKCancel); |
Thankyou so mouch Mallika!, it works perfectly!, greetings.
Hi!
I have used this strategy to change the Yes/No Texts, like this:
// Yes Button in German Language
case ResourceIdentifiers.Yes:
return "SI";
// No Button in German Language
case ResourceIdentifiers.No:
return "NO";
However, when the Dialogbox is shown, it doesn't respond to keyboard pressing 'S', 'N' or 'Y'. always the user needs to click the button.
How can we achieve to able the shown MessageBoxAdv DialogBox to respond to keypressing?
Thank in advance.
Hi Herney,
While we localize MessageBoxAdv we can achieve HotKey support by using '&' symbol before the text. Any character that has '&' symbol preceding it is considered as a hotkey. For Example, the character "S" is considered as a shortcut key when the text is &SI.
Code Snippets:
case ResourceIdentifiers.Yes: return "&SI"; return "&NO"; |
Regards,
Kayalvizhi S
No more words to say.
Every day I likemuch Syncfusion.
Hi Herney,
We are glad to know that your issue has been fixed. Please let us know if you need any other assistance. We will be happy to assist you.
Regards,
Kayalvizhi S