Do you want your language supported in V4 of the Citrix documentation scripts?

Updated 14-SEP-2013.

One of the most requested features being added to Version 4 of the documentation scripts is support for non-English versions of Microsoft Word.  The script currently supports the following languages:

  • Danish
  • English
  • French
  • German

Do you want your language supported?

It turns out adding support for non-English versions of Word is proving more challenging than I thought.  I have found the following four scenarios just from two testers:

  1. You can run a specific language version of Word on an English version of Windows
  2. You can run a specific language version of Word on a specific language version of Windows
  3. You can run a multilingual version of Word on an English version of Windows
  4. You can run a multilingual version of Word on a specific language version of Windows

And I would guess the following is also possible:

  • You can run a multilingual version of Word on a multilingual version of Windows

What I found is that for one of my testers using German Word, the new XenApp 6.5 V4 script ran with no issues.  For another tester, the script would error out using the German translations for “Heading 1” and “Heading 2” and very few of the Cover Pages worked.  Turned out the first tester was running multilingual Word on an English OS and the second tester was running German Word on a German OS.

For my first tester running under scenario #3 above, even though he switched to German Word the English OS caused the English language templates and Cover Pages to be used.

For my second tester running under scenario #2 above, I found out most of the Cover Pages had German names and his German Word refused to use “Überschrift 1” and “Überschrift 2” for “Heading 1” and “Heading 2” even though those are the correct German words that German Word uses.

I also learned that my default Cover Page “Motion” (which exists in English Word 2007/2010/2013), does not exist in any version of German Word!  OUCH!!!  Now I will need to come up with a different way of handling Cover Pages since the default Cover Page will cause the script to fail when run using German Word on a German OS.

Side trip here now.  I had a conversation with Remko Weijnen the other day about an idea I already have for V5 of the documentation scripts.  He suggested instead of using translated words for the various things I needed in different languages, I use Resource IDs (I think that is what Remko called them).    That way instead of needing “Überschrift 1” for “Heading 1”, I could use Resource Hacker and the Word DLL and find the resource ID for “Heading 1”.  Well I never could find the correct Word DLL to open in Resource Hacker but I did find an alternative.

When I was looking for Danish, German and French translations for things like “Heading 1”, my first tester found a PDF that already had all the translations.  That PDF can be found and downloaded here: http://www.thedoctools.com/index.php?show=wt_style_names_english_danish_german_french . When I looked at the website for the PDF, I came across this information:

In VBA, you should always  use the style name constants or  the corresponding numbers. This way, your code will be independent of the installed language version of Word.”

Using the site author’s PDF, instead of needing this in my script:

$hash= @{}

Switch ($PSUICulture.Substring(0,3))
{
	'da-'	{$hash.($($PSUICulture)) = @{
		'Word_NoSpacing' = 'Ingen afstand';
		'Word_Heading1' = 'Overskrift 1';
		'Word_Heading2' = 'Overskrift 2';
		'Word_Heading3' = 'Overskrift 3';
		'Word_Heading4' = 'Overskrift 4';
		'Word_TableOfContents' = 'Automatisk tabel 2';
		'Word_TableGrid' = 'Tabel – Gitter'
		}
	}

	'de-'	{$hash.($($PSUICulture)) = @{
		'Word_NoSpacing' = 'Kein Leerraum';
		'Word_Heading1' = 'Überschrift 1';
		'Word_Heading2' = 'Überschrift 2';
		'Word_Heading3' = 'Überschrift 3';
		'Word_Heading4' = 'Überschrift 3';
		'Word_TableOfContents' = 'Automatische Tabelle 2';
		'Word_TableGrid' = 'Tabellenraster'
		}
	}

	'en-'	{$hash.($($PSUICulture)) = @{
		'Word_NoSpacing' = 'No Spacing';
		'Word_Heading1' = 'Heading 1';
		'Word_Heading2' = 'Heading 2';
		'Word_Heading3' = 'Heading 3';
		'Word_Heading4' = 'Heading 4';
		'Word_TableOfContents'  = 'Automatic Table 2';
		'Word_TableGrid'  = 'Table Grid'
		}
	}

	'fr-'	{$hash.($($PSUICulture)) = @{
		'Word_NoSpacing' = 'Sans interligne';
		'Word_Heading1' = 'Titre 1';
		'Word_Heading2' = 'Titre 2';
		'Word_Heading3' = 'Titre 3';
		'Word_Heading4' = 'Titre 4';
		'Word_TableOfContents' = 'Table automatique 2';
		'Word_TableGrid' = 'Grille du tableau'
		}
	}

	Default	{$hash.('en-US') = @{
		'Word_NoSpacing' = 'No Spacing';
		'Word_Heading1' = 'Heading 1';
		'Word_Heading2' = 'Heading 2';
		'Word_Heading3' = 'Heading 3';
		'Word_Heading4' = 'Heading 4';
		'Word_TableOfContents'  = 'Automatic Table 2';
		'Word_TableGrid'  = 'Table Grid'
		}
	}
}

$myHash = $hash.$PSUICulture

If( $myHash -eq $null )
{
	$myHash = $hash.('en-US')
}

I can now do this:

$hash= @{}

Switch ($PSUICulture.Substring(0,3))
{
	'da-'	{$hash.($($PSUICulture)) = @{
		'Word_TableOfContents' = 'Automatisk tabel 2';
		}
	}

	'de-'	{$hash.($($PSUICulture)) = @{
		'Word_TableOfContents' = 'Automatische Tabelle 2';
		}
	}

	'en-'	{$hash.($($PSUICulture)) = @{
		'Word_TableOfContents'  = 'Automatic Table 2';
		}
	}

	'fr-'	{$hash.($($PSUICulture)) = @{
		'Word_TableOfContents' = 'Table automatique 2';
		}
	}

	Default	{$hash.('en-US') = @{
		'Word_TableOfContents'  = 'Automatic Table 2';
		}
	}
}

# http://www.thedoctools.com/index.php?show=wt_style_names_english_danish_german_french
$wdStyleHeading1 = -2
$wdStyleHeading2 = -3
$wdStyleHeading3 = -4
$wdStyleHeading4 = -5
$wdStyleNoSpacing = -158
$wdTableGrid = -155

$myHash = $hash.$PSUICulture

If( $myHash -eq $null )
{
	$myHash = $hash.('en-US')
}

$myHash.Word_NoSpacing = $wdStyleNoSpacing
$myHash.Word_Heading1 = $wdStyleheading1
$myHash.Word_Heading2 = $wdStyleheading2
$myHash.Word_Heading3 = $wdStyleheading3
$myHash.Word_Heading4 = $wdStyleheading4
$myHash.Word_TableGrid  = $wdTableGrid

Except for the Table of Contents entry of “Automatic Table 2” and Cover Pages, the script will now work in ANY language version of Microsoft Word.
Now what I need from you to make the script work in your language version of Word has changed.
I need the following information for your language’s version of Microsoft Word:

  • Table of Contents
    • Automatic Table 2

A list of the Cover Pages and what version of Word the Cover Pages came from (Word 2007 or 2010 or 2013) since not every Cover Page is in every version or language of Word.

My second tester actually went to the trouble of taking a screen shot of every Cover Page from the Blocks Organizer in Word and sending me a Zip file.  If you can do that, that would be great because the way a Cover Page looks is the same across language versions.  By sending screen shots of the different Cover Pages, if you can’t translate the name for a Cover Page, I can look and tell what is the Microsoft name for the Cover Page.

WHEW!!!

Thanks

Webster

, , ,

About Carl Webster

Webster is a Sr. Solutions Architect for Choice Solutions, LLC and specializes in Citrix, Active Directory and Technical Documentation. Webster has been working with Citrix products for many years starting with Multi-User OS/2 in 1990.

View all posts by Carl Webster

No comments yet.

Leave a Reply