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 - |
Pergunta
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?
Solução
Outras dicas
Yes .NET supports automatic fallback for resources: http://en.csharp-online.net/Localization_Like_the_Pros%E2%80%94Automatic_Fallback_for_Resources
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow