How to localize the SpellChecker dialog box in WinForms?
Localize the SpellChecker dialog box
You can localize the WinForms Spell Checker dialog box text by using ILocalizationprovider interface. The following code example demonstrates the same.
C#
LocalizationProvider.Provider = new Localizer(); class Localizer : ILocalizationProvider { public string GetLocalizedString(System.Globalization.CultureInfo culture, string name, object obj) { switch (name) { case ResourceIdentifiers.SpellCheckerButtonAddToDictionary: return "Zum Wörterbuch hinzufügen"; case ResourceIdentifiers.SpellCheckerButtonCustomDictionary: return "Benutzerwörterbuch"; case ResourceIdentifiers.SpellCheckerDialogCaption: return "Rechtschreibprüfung"; case ResourceIdentifiers.SpellCheckCompletedAlert: return "Rechtschreibprüfung abgeschlossen"; case ResourceIdentifiers.SpellCheckerButtonNew: return "Taste neue"; case ResourceIdentifiers.SpellCheckerDictioanryEditorCaption: return "Dictionary Editor"; case ResourceIdentifiers.SpellCheckerIgnoreEmailAddress: return "Ignorieren E-Mail Adresse"; case ResourceIdentifiers.SpellCheckerIgnoreFileNames: return "Ignorieren von Dateinamen"; case ResourceIdentifiers.SpellCheckerIgnoreHTMLTags: return "Ignorieren HTML Stichworte"; case ResourceIdentifiers.SpellCheckerIgnoreInternetAddress: return "Ignorieren Internet-Adresse"; case ResourceIdentifiers.SpellCheckerIgnoreMixedCase: return "Ignorieren Probierpaket"; case ResourceIdentifiers.SpellCheckerIgnoreSpecialCharacters: return "Ignorieren Sie Sonderzeichen"; case ResourceIdentifiers.SpellCheckerIgnoreUpperCase: return "ignorieren Großbuchstaben"; case ResourceIdentifiers.SpellCheckerIgnoreWordsWithNumbers: return "Wörter mit Zahlen ignorieren"; case ResourceIdentifiers.SpellCheckerLabelDictionary: return "DE label dictionary"; case ResourceIdentifiers.SpellCheckerLabelDictionaryPath: return "DE Dictionarypath"; case ResourceIdentifiers.SpellCheckerLabelNotInDictionary: return "Nicht im Wörterbuch"; case ResourceIdentifiers.SpellCheckerLabelOptions: return "Etikettenoptionen"; case ResourceIdentifiers.SpellCheckerLabelSuggestions: return "Vorschläge"; case ResourceIdentifiers.SpellCheckerLabelWords: return "label cap"; case ResourceIdentifiers.SpellCheckerOptionsDialogCaption: return "Rechtschreibprüfung Option"; case ResourceIdentifiers.OK: return "OKAY"; case ResourceIdentifiers.Cancel: return "Abbrechen"; case ResourceIdentifiers.Options: return "Opciones"; case ResourceIdentifiers.Change: return "cambio"; case ResourceIdentifiers.ChangeAll: return "Cambiar todo"; case ResourceIdentifiers.IgnoreOnce: return "einmal ignorieren"; case ResourceIdentifiers.IgnoreAll: return "alle ignorieren"; case ResourceIdentifiers.Undo: return "Cambiar todo"; default: return string.Empty; } } }
VB
LocalizationProvider.Provider = New Localizer() Class Localizer Implements ILocalizationProvider Public Function GetLocalizedString(ByVal culture As System.Globalization.CultureInfo, ByVal name As String, ByVal obj As Object) As String Select Case name Case ResourceIdentifiers.SpellCheckerButtonAddToDictionary Return "Zum Wörterbuch hinzufügen" Case ResourceIdentifiers.SpellCheckerButtonCustomDictionary Return "Benutzerwörterbuch" Case ResourceIdentifiers.SpellCheckerDialogCaption Return "Rechtschreibprüfung" Case ResourceIdentifiers.SpellCheckCompletedAlert Return "Rechtschreibprüfung abgeschlossen" Case ResourceIdentifiers.SpellCheckerButtonNew Return "Taste neue" Case ResourceIdentifiers.SpellCheckerDictioanryEditorCaption Return "Dictionary Editor" Case ResourceIdentifiers.SpellCheckerIgnoreEmailAddress Return "Ignorieren E-Mail Adresse" Case ResourceIdentifiers.SpellCheckerIgnoreFileNames Return "Ignorieren von Dateinamen" Case ResourceIdentifiers.SpellCheckerIgnoreHTMLTags Return "Ignorieren HTML Stichworte" Case ResourceIdentifiers.SpellCheckerIgnoreInternetAddress Return "Ignorieren Internet-Adresse" Case ResourceIdentifiers.SpellCheckerIgnoreMixedCase Return "Ignorieren Probierpaket" Case ResourceIdentifiers.SpellCheckerIgnoreSpecialCharacters Return "Ignorieren Sie Sonderzeichen" Case ResourceIdentifiers.SpellCheckerIgnoreUpperCase Return "ignorieren Großbuchstaben" Case ResourceIdentifiers.SpellCheckerIgnoreWordsWithNumbers Return "Wörter mit Zahlen ignorieren" Case ResourceIdentifiers.SpellCheckerLabelDictionary Return "DE label dictionary" Case ResourceIdentifiers.SpellCheckerLabelDictionaryPath Return "DE Dictionarypath" Case ResourceIdentifiers.SpellCheckerLabelNotInDictionary Return "Nicht im Wörterbuch" Case ResourceIdentifiers.SpellCheckerLabelOptions Return "Etikettenoptionen" Case ResourceIdentifiers.SpellCheckerLabelSuggestions Return "Vorschläge" Case ResourceIdentifiers.SpellCheckerLabelWords Return "label cap" Case ResourceIdentifiers.SpellCheckerOptionsDialogCaption Return "Rechtschreibprüfung Option" Case ResourceIdentifiers.OK Return "OKAY" Case ResourceIdentifiers.Cancel Return "Abbrechen" Case ResourceIdentifiers.Options Return "Opciones" Case ResourceIdentifiers.Change Return "cambio" Case ResourceIdentifiers.ChangeAll Return "Cambiar todo" Case ResourceIdentifiers.IgnoreOnce Return "einmal ignorieren" Case ResourceIdentifiers.IgnoreAll Return "alle ignorieren" Case ResourceIdentifiers.Undo Return "Cambiar todo" Case Else Return String.Empty End Select End Function End Class
The following screenshot illustrates the SpellChecker window.
Figure 1: SpellChecker window
The following screenshot illustrates the option window.
Figure 2: Option window
Conclusion
I hope you enjoyed learning about how to localize the Spell Checker dialog box in WinForms.
You can refer to our WinForms Spell Checker feature tour page to know about its other groundbreaking feature representations and documentation. You can also explore our WinForms Spell Checker example to understand how to present and manipulate data.
For current customers, you can check out our WinForms controls from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our WinForms Spell Checker and other WinForm controls.
If you have any queries or require clarifications, please let us know in the comments below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!