|
|
Preparing project for Localization |
Where to put source language resourcesThe source language is the language in which a piece of software has been developed. Resources in this language can be placed in a main assembly, which will then contain code and resources, or in a satellite, the satellite will then contain just resources and the main assembly will contain just code. Our recommendation is that the source language resources be stored in the main assembly. This is the default setting in the development environment. However, as well as ensuring that there is no <UICulture> entry in the csproj file, the following should be added in AssemblyInfo.cs, it explicitly states the location of the source language resources: [assembly:NeutralResourcesLanguage("en-IE", UltimateResourceFallbackLocation.MainAssembly)]
String tablesIf you are writing a purely XAML GUI application, we recommend you don't use a ResX string table to store UI strings. Leave them all in XAML declaration or alternatively use a resource dictionary. A resource dictionary is a XAML construct; however it does not typically store any UI, just a list of strings with IDs, wrapped in some XAML mark-up. Resource dictionaries can also store style information, themes and binary resources among other things. For simplicity, each type of resource can be factored into a different resource dictionary and these can be merged later if required. The resource dictionary can be stored at application level and referenced throughout the WPF application. There is a lot of built-in support for this mechanism and it's very flexible when setup correctly, more so than ResX files. Resource dictionaries should not be used to store visual templates as the contents of resource dictionaries cannot be visualized.
File Preparation
Related topics
Products or Versions Affected
Last updated with Catalyst 11 Sp1
|