Hi, I am required to develop software in English and Spanish and as such all of our apps are setup for localization. Our basic solution/project structure is to have a central project, called ProjectName.Core or ProjectName.Localization, and in this project have the following files.
Strings.resx - Contains all localizable (in English) strings, messages, errors, etc.
Example
ErrorMovePallet = "Cannot move pallet "{0}" to slot {1}."
Glossary.resx - Contains common terms of the system.
Examples
PalletTerm = "pallet"
PalletCapitalized = "Pallet"
SlotTerm = "slot"
SlotCapitalized = "Slot"
Given the example text above I have been substituting the glossary terms into the strings at runtime. So instead of "Cannot move pallet "{0}" to slot {1}.", I have "Cannot move {1} "{4}" to {3} {5}" with code like...
public static string ErrorMovePallet(string palletId, int slotId) { return string.Format(Strings.ErrorMovePallet, Glossary.PalletCapitalized, Glossary.PalletTerm, Glossary.SlotCapitalized, Glossary.SlotTerm, palletId, slotId); }
This seamed like a good idea at the time but now I'm becoming concerned that this approach may lead to problems because other languages do fit into this structure especially where plurals are concerned.
I'd like to hear what others are doing especially those working on, or worked on, products that ship(ped) for different languages.
Would I be better off just having the basic string, such as "Cannot move pallet "{0}" to slot {1}.", and letting the translators sort out the pallet/slot bit or am I better using the glossary approach?
Thanks.