Display case on map match abbreviation dictionary in ArcGIS Pro

555
4
Jump to solution
04-12-2023 03:36 AM
Michele
Occasional Contributor

I have created an abbreviation dictionary in ArcGIS Pro that contains independent country names and territories. I would like the country names to be displayed in all uppercase on my map and the territories to be in mixed case. Is there a way to do this?

0 Kudos
1 Solution

Accepted Solutions
JesseWickizer
Esri Contributor

Translation entry in an abbreviation dictionary always changes the matched word or phrase to the new value. But you can have another abbreviation dictionary entry for the translated word. So in this case you might have a Translation entry that changes TAIWAN to Taiwan, and another Keyword dictionary entry that changes Taiwan to Tai. if there isn't enough space. 

In the screenshot below you can see an abbreviation dictionary that has 1 Keyword entry for AFGHANISTAN that will change it to AFG only if needed. Then BERMUDA and TAIWAN each have 2 entries - one Translation and one Keyword. The translation entry will always kick in, and if there is not enough space for the translated word then the Keyword translation will be used. (Pardon the geographic impossibilities of this map.)

Here you can see from the attribute table that the data contains all upper case names. TAIWAN is translated to Taiwan because there is room, and AFGHANISTAN is abbreviated to AFG because there isn't enough room for the full word.

JesseWickizer_0-1681760853759.png

Zooming out more and shifting the coverage area shows that TAIWAN now uses the Keyword translation and AFGHANISTAN doesn't use any translation. 

JesseWickizer_1-1681761056134.png

Regarding your comment about AFGHANISTAN being changed to Afghanistan - setting Text case to Normal wouldn't change data that's stored in upper case to Mixed/Title case - rather the Normal setting doesn't make any adjustment to the source text. A few things to investigate are:

  1. Is the source text in the attribute table stored in upper case or title case?
  2. Does the label expression use the field containing the upper case name?
  3. Do you have an abbreviation dictionary Translation entry for AFGHANISTAN that would be converting the label to Afghanistan?

View solution in original post

0 Kudos
4 Replies
JesseWickizer
Esri Contributor

If you add entries in an abbreviation dictionary for each country and territory in the case you'd like it displayed at, the label will use the case in the abbreviation dictionary. The abbreviation dictionary entries must use Translation type in order to force each label to use the translation.

In this example, the labels inside the polygon use the abbreviation dictionary, and the labels below the polygon use the original label.

JesseWickizer_1-1681417529078.png

 

0 Kudos
Michele
Occasional Contributor

This makes sense now the way you described it above.  You should consider adding this to the abbreviation and truncate labels help page as it is more descriptive. 

My only issue is that when I use this method in the abbreviation dictionary, it does not try to fit the entire label first if it can.  It just automatically assigns the abbreviation. For example I have Taiwan that I want to be abbreviated Tai. when the feature is too small to fit the entire name, but it always assigns the abbreviation.  Is it supposed to work that way? 

I should have also mentioned that I had the text case assigned to upper case for the layer, because I want most of the labels to be upper case.  I have about 70 or so that I need to be mixed case (smaller islands, territories)  When I assign "normal" to the text case it makes all my labels that I want uppercase, mixed case.  AFGHANISTAN becomes Afghanistan.  What I am looking to do is keep AFGHANISTAN if it fits in the polygon, but if it becomes too small then the abbreviation of AFG. should kick in. Same with "Bermuda".  I want it to display Bermuda if it fits and if it doesn't then make it "Berm."  Is there a way to do this?

You cannot use translation if you have multiple abbreviations, correct.  That's another issue I'm running into using translation.

 

0 Kudos
JesseWickizer
Esri Contributor

Translation entry in an abbreviation dictionary always changes the matched word or phrase to the new value. But you can have another abbreviation dictionary entry for the translated word. So in this case you might have a Translation entry that changes TAIWAN to Taiwan, and another Keyword dictionary entry that changes Taiwan to Tai. if there isn't enough space. 

In the screenshot below you can see an abbreviation dictionary that has 1 Keyword entry for AFGHANISTAN that will change it to AFG only if needed. Then BERMUDA and TAIWAN each have 2 entries - one Translation and one Keyword. The translation entry will always kick in, and if there is not enough space for the translated word then the Keyword translation will be used. (Pardon the geographic impossibilities of this map.)

Here you can see from the attribute table that the data contains all upper case names. TAIWAN is translated to Taiwan because there is room, and AFGHANISTAN is abbreviated to AFG because there isn't enough room for the full word.

JesseWickizer_0-1681760853759.png

Zooming out more and shifting the coverage area shows that TAIWAN now uses the Keyword translation and AFGHANISTAN doesn't use any translation. 

JesseWickizer_1-1681761056134.png

Regarding your comment about AFGHANISTAN being changed to Afghanistan - setting Text case to Normal wouldn't change data that's stored in upper case to Mixed/Title case - rather the Normal setting doesn't make any adjustment to the source text. A few things to investigate are:

  1. Is the source text in the attribute table stored in upper case or title case?
  2. Does the label expression use the field containing the upper case name?
  3. Do you have an abbreviation dictionary Translation entry for AFGHANISTAN that would be converting the label to Afghanistan?
0 Kudos
Michele
Occasional Contributor

Thanks for the detailed explanation on how this works.  The text in my attribute table was in title text. I didn't realize just changing the text case to uppercase would have an impact on the abbreviations.  I made a new field in the attribute table that has the spelling in the case I want it defaulted to and then added the translation and keyword in the abbreviation dictionary as needed.  This seems to have fixed all my issues.  Thanks again for all of your help!

0 Kudos