In a WPF application, for a localizable text resource such as an error message, should I be using a .resx file or a ResourceDictionary. If the answer is either/or what factors would help me decide which to use?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Using .resx files – with the name of the culture in the filename – is probably the easiest way to go. The loading of the appropriate resources is handled for you.
So you’d have “ResourceFile.resx” as your default and then “ResourceFile.en-GB.resx”, “ResourceFile.fr-FR.resx” etc for your localised strings.
You only need to put those strings that actually need localisation in the language files. If the string’s not present in the culture specific file it falls back to the default file.