Select to view content in your preferred language

Change the displayed language on ESRI controls

1227
7
06-17-2011 02:51 AM
GalTalmor
Emerging Contributor
Hello 🙂
I have two ESRI controls in my xaml : Navigation and ScaleBar.. Those controls display an english letters or words : N (short for North) or distance units (Kilometers\Meters etc.)
Can I change the language of those letters&words?
I noticed that the controls have a "Language" property, and I tried to use that, but it was'nt working.. maybe the usage way was wrong.
I also tried to use ControlTemplate, but it was not defined there.

Please help me if you have an idea
Thank you very much!! 🙂
0 Kudos
7 Replies
IgressT
Emerging Contributor
This is what I do in my app

follow this link http://msdn.microsoft.com/en-us/library/dd882554(v=vs.95).aspx
then this link http://msdn.microsoft.com/en-us/library/dd941931(v=vs.95).aspx

after that using blend I edit the template of the Navigation control. In the template find the textblocks for N,E,W,S and replcae the static texts with binding as explained in first link

Let me know if there is a better approach
0 Kudos
GalTalmor
Emerging Contributor
This is what I do in my app

follow this link http://msdn.microsoft.com/en-us/library/dd882554(v=vs.95).aspx
then this link http://msdn.microsoft.com/en-us/library/dd941931(v=vs.95).aspx

after that using blend I edit the template of the Navigation control. In the template find the textblocks for N,E,W,S and replcae the static texts with binding as explained in first link

Let me know if there is a better approach


OK, that's sounds good. But are you sure that the N,E,W,S letters appear in the template? I remember that they are not.. I'll check this issue again (now I using on computer without a Visual Studio...)
Thank you 🙂

And what about the scale bar units? The "DisplayUnits" property refers to ScaleBarUnits enum. I can't change its values. Is there a way to do that? maybe with Converter?..

Thank you for help!!
0 Kudos
IgressT
Emerging Contributor
OK, that's sounds good. But are you sure that the N,E,W,S letters appear in the template? I remember that they are not.. I'll check this issue again (now I using on computer without a Visual Studio...)
Thank you 🙂

And what about the scale bar units? The "DisplayUnits" property refers to ScaleBarUnits enum. I can't change its values. Is there a way to do that? maybe with Converter?..

Thank you for help!!


Sure they do appear in the template look at the attachment I was able to convert navigation cotrol directions to French...
0 Kudos
GalTalmor
Emerging Contributor
Sure they do appear in the template look at the attachment I was able to convert navigation cotrol directions to French...

Excellent! Thank you 🙂
0 Kudos
DominiqueBroux
Esri Frequent Contributor

And what about the scale bar units? The "DisplayUnits" property refers to ScaleBarUnits enum. I can't change its values.


From 2.2, the ScaleBar control has been deprecated and replaced by the 'ScaleLine' control which is localizable just by retemplating.
0 Kudos
GalTalmor
Emerging Contributor
From 2.2, the ScaleBar control has been deprecated and replaced by the 'ScaleLine' control which is localizable just by retemplating.


Thank you, I'll try this.. 🙂
The ScaleBar display way is really unclear.. and I always use template to change that. Therefore (and because the language problem solution), the ScaleLine control sounds me perfect!
0 Kudos
GalTalmor
Emerging Contributor
Oh, now I see again the Navigation ControlTemplate... the "N"s are Path controls.. and I searched for TextBlocks and I didn't found them.. now it's simple.

For the ScaleBar I created a ControlTemplate and I hid the "ScaleBarValue" (Visibility="Collapsed") and then I added another TextBlock that bind to "ScaleBarValue" text property, with a custom conveter. The converter replaces the language.
🙂
0 Kudos