I have something like this in mind:
<appSettings>
<add key="ConfigName" value="configuration" culture="1033" />
<add key="ConfigName" value="konfiguracja" culture="1045" />
</appSettings>
but the add element has only 2 attributes – key and value, so I guess it’s not supported.
Next thing that comes to my mind is:
<appSettings>
<add key="ConfigName-1033" value="configuration" />
<add key="ConfigName-1045" value="konfiguracja" />
</appSettings>
Can anybody suggest a better solution?
UPDATE – solution I implemented:
The downside of moving this information to resource files (Oded’s answer) is the fact that it can no longer be easily modified on developers’ and testers’ machines.
However, here’s what I did – I left the settings in the web.config file (they cannot be localized, but they can be modified with no need to recompile the code) and added them to resource files (they can be localized; they are be used in production environment only, where the web.config settings are set to empty strings).
You should not store localization data in
configfiles.Use satellite assemblies and resource files for localization.
If all you have is a small number of items, holding things in
configcould be OK, but experience suggests that the number of items will grow until this will end up being a maintenance nightmare.See this guide (Globalization and localization demystified in ASP.NET 2.0) for more details.