-
-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BLoc, TranslateConverter: target provider is ignored #257
Comments
Be honest: I tried everything and this is nearly impossibe. SO ANY Ideas are highly welcome For the converter this is not possible, because the converter. We solve the issue in the way that we define here always the "long" key with assemblyname:resourcename:key |
We use our own About fix problem with xaml provider. My dream - refuse Bloc and Translate converter. I'll try check some idea about this and create PR with proof-of-concept |
Oh, this is a good point, because my way only works Assembly/Resource/Key and not for a different Provider. |
We store localization data in files near .exe file. This allows update localization texts without recompilation application. |
1. Bad idea <TextBlock >
<TextBlock.Text>
<lex:LocText Key="HelloWorld" Converter="{c:FormatStringConverter}">
<Binding A />
<Binding B />
<Binding C />
</lex:LocText>
</TextBlock.Text>
</TextBlock> I think it is the most common case. But it's looks a bit awful. 2. Not so bad Idea but with breaking changes |
@Karnah |
Hmmm. I don't like full keys because they are long and there is easy to make mistakes. Is it possible to use just "provider:key" and automaticly resolve conflicts? Or use separate property for provider name? For example: |
@Karnah I like more the last idea from you with a separated Provider Attribute. |
Related to #254
BLoc
orTranslateConverter
are always pass null as target.https://github.com/XAMLMarkupExtensions/WPFLocalizationExtension/blob/077bac2daeed0c982ff63788fd9839ced3c1c63d/src/Extensions/BLoc.cs#L311
https://github.com/XAMLMarkupExtensions/WPFLocalizationExtension/blob/077bac2daeed0c982ff63788fd9839ced3c1c63d/src/ValueConverters/TranslateConverter.cs#L57
So you cannot override provider for window/page/control. So it always will use
LocalizeDictionary.DefaultProvider
. This can be a problem for application which use different providers.The text was updated successfully, but these errors were encountered: