I need to format boolean as string for multilanguage support "Ja"/"Nein". What is the right format string that I need for DisplayFormat and EditFormat?
I am using DevExpress with repositoryItemTextEdit as column editor in design but I think it’s the same with any other binding string format. Is there another approach?
I need to format boolean as string for multilanguage support "Ja"/"Nein". What is the
Share
You should definitely extract literal values “Ja”/”Nein” into localization resources. Laoujin makes a great response, but I will expand it a little bit with examples.
First, define custom format provider, that will use localization in some sort
Private methods for
LocalizedBoolFormattercould look like:Then you can simply format value using custom formater, which would be localized by a formatter
With DevExpress RepositoryItemTextEdit you can use the Custom Formatting as follows: