.net - How to Create a new culture assembly WPF -
i following tutorial on implementing localization in application.
but cant head around step 4, says create new culture assembly.
the loaded assemblies resourcedictionaries used replace default 1 within main assembly.
- create normal wpf app, , use
resourcedictionary
strings- use
mergeddictionary
inapp.resources
- make sure localizable controls using
dynamicresource
<label content=”{dynamicresource label1}”/>
- create new culture assembly sensible name, such culture_fr-ca
- for assembly created in step 4, create mirror image
resourcedictionary
matches original assembliesresourcedictionary
. translated strings- compile culture assembly folder under main assemblies bin\debug folder. demo assumes folder called “culturefiles”
- when main app runs, current culture , load matching assembly disk
- from loaded culture assembly, extract
resourcedictionary
- using extracted
resourcedictionary
, replace currentapplication.mergedresources
dictionary newly extracted cultureresourcedictionary
- all controls refer dynamic resources should ok new cultural strings
as far can tell means add wpf project solution. add name of culture project's name.