Language Support in Visio 2010

I was recently asked to provide the ability to store multiple language shape text and page names in Visio 2010. An interesting request that has inspired me create a useful add-in for Visio 2010 (Multi-Language Text for Visio coming soon), and prompted me to investigate language support in Visio 2010. I have written Visio add-ins that have needed to work in several different language editions of Visio before, and have been aware of the special considerations in creating ShapeSheet formulae, but this is more about supporting different languages in the same edition of Visio … and I was surprised how good this feature is!

Firstly, each Visio application is installed as a particular language. You can find yours by typing the following in the VBA Immediate Window:
?Visio.Application.Language
My copy returns 1033, whic is English (United States), see http://msdn.microsoft.com/en-us/goglobal/bb964664.aspx for Locale IDs Assigned by Microsoft. My edition of Visio is downloaded from MSDN, so it may not be typical of the version sold publicly in the UK.
Secondly, each Visio document stores its language ID, which you can find by looking at the DocLangID cell in the Document Properties section of the DocumentSheet or by typing the following in the VBA Immediate Window:
?Visio.ActiveDocument.Language
My copy of Visio returns 1033 for documents created using the US Units templates, or 2057, which is English (United Kingdom), for documents created from the Metric templates. See http://msdn.microsoft.com/en-us/library/ff767057.aspx for information about DocLangID.
You can also view or edit the language of the document from the Advanced Properties drop-down button on the File \ Info backstage view.
Select Advanced Properties from File \ Info backstage view
You can then select the language on the Properties dialog.

Document Properties dialog

Thirdly, each shape in a Visio document stores its own language in the LangID cell of the Miscellaneous section of the ShapeSheet, or this can be discovered by selecting a shape, the typing the following in the VBA Immediate Window:
?Visio.ActiveWindow.Selection.PrimaryItem.Language
There is also a LangID cell in the Shape Data and Character sections of a ShapeSheet, and in the Annotation section of the PageSheet.
In my version of Visio, all of the shapes have the LangID of 1033, regardless of whether they are from the Metric or US Units stencils, and the Shape Data rows on these shapes have a LangID of 1033. However, inserting a new Shape Data row creates a LangID of 1033 on the US Units document, but 2057 on the Metric units document. I would suggest that this is inconsistent behavior, and if Microsoft are doing their localisation of templates and stencils correctly, then the shapes and Shape Data rows should have the same LangID as the template and stencil.
I note that the LangID of the Characters section is the same as the template, as it should be.
So, what of this LangID code? Well, their are 115 different LCIDs listed for Visio, so I assumed that these would be a subset of the 238 listed on the Microsoft Locale Ids document mentioned earlier, and that these would be available in the System.Globalization namespace as a CultureInfo object.  However, I was wrong!
This table lists the language code supported by Visio, but not supported (yet) by the .Net Framework System.Globalization… so, beware, if you speak Latin!
Language LCID
Cherokee 1116
Edo 1126
Fulfulde 1127
Hawaiian 1141
Ibibio 1129
Kanuri 1137
Kashmiri 2144
Kashmiri
(Arabic)
1120
Latin 1142
Manipuri 1112
Oromo 1138
Sindhi 1113
Somali 1143
Tamazight
(Arabic, Morocco)
1119
Tigrigna (Eritrea) 2163
Tigrigna
(Ethiopia)
1139
Yiddish 1085

2 Responses to “Language Support in Visio 2010”

  1. Michael Says:

    Perfect tool, works fine. I published the document to visio serivces. Is it possible to switch the language in visio serivces on sharepoint? Thanks Michael.

    • davidjpp Says:

      An interesting question. I store alternative language texts in Visio SolutionXML, but I don’t think this sort of data is exposed to Visio Services. My probable approach would be provide a one-click publishing action to selected languages.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

davecra.wordpress.com/

Microsoft Office Development, and more...

PowerShell.Amsterdam

Automate, Accelerate, Accurate

johnvisiomvp

Life with Visio and other Microsoft Toys!

Title (Required)

Windows Server Essentials Tips & Tricks

Nilsandrey's Weblog

Just another WordPress.com weblog

Things that Should be Easy

Every so often (too often in the IT industry) I encounter things that should have been very easy to do but turned out to be far too complicated. My favorite topics include SharePoint, .Net development, and software architecture, especially distributed systems.

Visio Guy

Shapes, Stencils, Drawings Templates, Tutorials, Tips & Developer Info for Microsoft Visio

Hannes's Virtual Earth

Tips & Tricks around Mapping and Cloud Computing

Pluralsight blog

be smart, be clear, be visual ...

%d bloggers like this: