normally the path for a specific localization would be AppBase/pt-Br/xx.dll but you could also put the file in the nutral culture where it looks if it cannot find a specific one. in this case appBase/pt/xxx.dll
Can .NET automatically support localization for a parent culture?
-
05-12-2021 - |
Question
I have a .NET application that has been translated for the pt-BR locale, resulting in a satellite assembly:
pt-BR/MyApp.resources.dll
I do not have a translation for the pt-PT locale. I expected the pt-BR assembly to be used when the pt-PT culture is active due to their sharing a parent culture, but it isn't.
Can .NET somehow automatically use the pt-BR assembly under pt-PT cultures, or do I need to explicitly put my pt-BR translations in a pt assembly until I get more pt translations?
La solution
Autres conseils
Yes .NET supports automatic fallback for resources: http://en.csharp-online.net/Localization_Like_the_Pros%E2%80%94Automatic_Fallback_for_Resources
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow