Using localization control

4 posts, 0 answers
  1. Abhi Basu
    Abhi Basu avatar
    7 posts
    Member since:
    Sep 2009

    Posted 08 Sep 2009 Link to this post

    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.
  2. Ivan
    Admin
    Ivan avatar
    519 posts

    Posted 11 Sep 2009 Link to this post

    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.
  3. Abhi Basu
    Abhi Basu avatar
    7 posts
    Member since:
    Sep 2009

    Posted 11 Sep 2009 Link to this post

     

     

    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>

     

  4. Ivan
    Admin
    Ivan avatar
    519 posts

    Posted 17 Sep 2009 Link to this post

    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.
Back to Top