This is a migrated thread and some comments may be shown as answers.

Using localization control

3 Answers 131 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Abhi Basu
Top achievements
Rank 1
Abhi Basu asked on 08 Sep 2009, 09:47 PM
I was looking at the localization samples and had a question about it. Please look at the sample below:

 <Button x:Name="ButtonSearch" Visibility="Visible" Height="20" Grid.Row="0" Grid.Column="1"
                    TelerikControls:LocalizationManager.ResourceKey="ButtonSearch"
            Click="ButtonSearch_Click" Margin="344.035,33,70.965,35" ClickMode="Press" Cursor="Hand"
                     RenderTransformOrigin="0.5,0.5"
                    UseLayoutRounding="False" d:LayoutRounding="Auto" Background="#FFEBF0F3">

This works. Now, how would I localize the tooltip for the button as this form of localization seems to be looking for the "content" property?

Something I could have done like:
<TextBox x:Name="TextBoxLastNameSearch" Visibility="Visible" Height="20" Grid.Row="0" Grid.Column="1"
                 Margin="143,9,242,0" ToolTipService.ToolTip="{Binding Path=StringLibrary.XamWebGridPatients_Identifier, Source={StaticResource LocalizedStrings}}"

Just trying to find a consistent way to localize all controls on the page.

Thanks.

3 Answers, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 11 Sep 2009, 05:38 PM
Hi Abhi Basu,

Thank you for the sample code.

Please try the following code:

<Button ...> 
    <ToolTipService.ToolTip> 
        <ToolTip telerik:LocalizationManager.ResourceKey="MyKey"/> 
    </ToolTipService.ToolTip> 
</Button> 

We hope this information will help you.

Greetings,
Ivan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Abhi Basu
Top achievements
Rank 1
answered on 11 Sep 2009, 05:49 PM

 

 

I tried the following test and tooltip does work. Thanks.

<
Button x:Name="ButtonSearch" Visibility="Visible" Height="20" Grid.Row="0" Grid.Column="1"

 

 

TelerikControls:LocalizationManager.ResourceKey="ButtonSearch"

 

 

Click="ButtonSearch_Click" Margin="344.035,33,70.965,35" ClickMode="Press" Cursor="Hand"

 

 

RenderTransformOrigin="0.5,0.5"

 

 

UseLayoutRounding="False" d:LayoutRounding="Auto" Background="#FFEBF0F3">

 

 

 

<ToolTipService.ToolTip>

 

 

 

<ToolTip TelerikControls:LocalizationManager.ResourceKey="XamWebGridPatients_Identifier"/>

 

 

 

</ToolTipService.ToolTip>

 

 

 

<Button.RenderTransform>

 

 

 

<TransformGroup>

 

 

 

<ScaleTransform/>

 

 

 

<SkewTransform AngleX="2" AngleY="0"/>

 

 

 

<RotateTransform Angle="0"/>

 

 

 

<TranslateTransform/>

 

 

 

</TransformGroup>

 

 

 

</Button.RenderTransform>

 

 

 

</Button>

 

0
Ivan
Telerik team
answered on 17 Sep 2009, 08:09 AM
Hello Abhi,

In general your Xaml-code looks OK. Of course you should prepare a resource file(s) or a LocalizationManager in order to complete the localization. If it is suitable you can send us the problematic project and we will investigate and correct it.

Meantime please preview the following article. Here the localization process is explained in depth and attached examples are prepared:

Below are two particular articles related to the localization:
Regards,
Ivan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Abhi Basu
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Abhi Basu
Top achievements
Rank 1
Share this question
or