localization inside a resource dictionary
Hi,
We've been using the localization extension:
https://www.noesisengine.com/docs/App.A ... nsion.html
And so far it's been working well for us.
We did have one question - we haves several resource dictionaries declared in xaml (not user controls) that contain styling information, default buttons, and templates (for use in list controls). Many of these have strings we want to localize.
Is there a way to use loc extension in resource dictionaries like these? Or is there a recommendation on how best to make this work?
thanks,
sam
We've been using the localization extension:
https://www.noesisengine.com/docs/App.A ... nsion.html
And so far it's been working well for us.
We did have one question - we haves several resource dictionaries declared in xaml (not user controls) that contain styling information, default buttons, and templates (for use in list controls). Many of these have strings we want to localize.
Is there a way to use loc extension in resource dictionaries like these? Or is there a recommendation on how best to make this work?
thanks,
sam
-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: localization inside a resource dictionary
Hi Sam,
The use case will be to use the Loc extension in elements of a template, right?
Do you need to use the localization extension in any other context in a ResourceDictionary? I want to confirm we cover all the situations.
The use case will be to use the Loc extension in elements of a template, right?
Code: Select all
<ControlTemplate x:Key="Button" TargetType="Button">
<StackPanel>
<TextBlock Text="{noesis:Loc BtnHeader}"/>
<ContentPresenter/>
</StackPanel>
</ControlTemplate>Re: localization inside a resource dictionary
The other case where we're using it is in data templates. Here's a snipped example from our project:
I'll check with our designers to see if they can think of any other examples, but i think data template is the main one.
thanks,
sam
Code: Select all
<DataTemplate x:Key="NetworkGroupEntryTemplate">
<Grid x:Name="Root">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{noesis:Loc Members}" Style="{StaticResource Text.Body}"/>
</StackPanel>
</Grid>
</DataTemplate>
thanks,
sam
-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: localization inside a resource dictionary
Ok, I did some tests and that scenario (using the loc extension inside templates - ControlTemplate or DataTemplate) is not supported with the current implementation.
Could you please report it in our bugtracker? We will provide a patch for you to try.
Could you please report it in our bugtracker? We will provide a patch for you to try.
Who is online
Users browsing this forum: No registered users and 9 guests