Bilingualism - Styles

J

John... Visio MVP

I have a Bilingual Word template that can switch between English and
French. A document variable controls the languange and all the generated is
handled as strings. The template contains an English toolbar and a French
toolbar. Only the language of choice toolbar is visible.

The one thing I am stuck on is the Styles. They are all in English. Do I
duplicate the styles and use French names. Can I hide the unwanted styles?

So, any suggestions? and yes, I am seriously considering making an English
only and a French only template and share the code between them.

Currently the template is in Word 2003, but the same issue with styles will
appear in Word 2007.

John...
 
C

Cindy M.

Hi John...,

For me, the key question would be: how are you controlling the language
formatting of the document?

Traditionally in Word styles have been used for this purpose. With that
approach, you have two basic options:

1. Set up two sets of styles. A base style (as a replacement for "Normal")
that sets the defaults, including the language.

2. Programmatically change the language setting of the Normal style, and that
will cascade through all the styles. (So only one set)

If you want the style names to be localized, then the first approach would
make more sense. Word 2007 gives you the option to hide styles. Display the
Styles task pane, then click the "Manage Styles" button. Go to the "Recommend"
tab. Here you'll see all styles listed that are in the document. Notice that
buttons at the bottom to Show, Hide or Hide until used.

You also have the capability to assign a priority level to the styles and can
display them by priority (rather than alphabetized). Further, you can choose
which ones to display in the "Quick Styles" control in the Home Ribbon tab.

All of these things have equivalents in the object model, although some of
them are a bit obscure and tricky to use. So you could use a macro to change
the visibility of two sets of styles, should you wish.
I have a Bilingual Word template that can switch between English and
French. A document variable controls the languange and all the generated is
handled as strings. The template contains an English toolbar and a French
toolbar. Only the language of choice toolbar is visible.

The one thing I am stuck on is the Styles. They are all in English. Do I
duplicate the styles and use French names. Can I hide the unwanted styles?

So, any suggestions? and yes, I am seriously considering making an English
only and a French only template and share the code between them.

Currently the template is in Word 2003, but the same issue with styles will
appear in Word 2007.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
J

John... Visio MVP

So it looks like more possibilities with Word 2007.

For most of the template, the bilingualism is handled by using IIF(LangId =
"E","English Text","French Text")
instead of "Text".
With the Styles, the name of the style is an issue, "Red","Blue" or
"Rouge","Bleu". Some of this is hidden behind buttons on the toolbar or in
the ribbon, but the style name is still visible under certain circumstances.
Another issue with styles is when the style includes fixed text. Case 1,
Case 2 etc. A second style is required where "Case" is replaced by the
appropriate French word.

So thanks for the info, you have given me a few more things to play with.
Opps, I meant research. ;-)

John... Visio MVP (The one without the G)
 
K

Klaus Linke

Hi John,

Another approach would be to have your controls query which language version
it's run on (Application.Language), and adapt the captions accordingly?
If you stick with built-in styles, the style names will adapt automatically
even if you don't do anything.

Klaus
 
J

John... Visio MVP

Thanks Klaus

That is a possibility, but the user may have a default English computer, but
decide that certain things will be done in French or vis versa. The language
of choice is more dependant on the receiver of the document rather than the
user who creates it.

I just finished the Ribbon for this project and creating an English or
French Ribbon segment was a piece of cake. I have one group for English and
one group for French and they both call the same background routines. So it
is just a matter of making the group for the specific language visible and
the other not visible. The initial attempt was to use callbacks to set the
caption language, the tips and the supertips. The other advantage to using
independant groups is that the order of the items can be changed.

John... Visio MVP
 
K

Klaus Linke

Glad you've got it solved... My thought was that if a user has an English
Word, s/he likely will have no trouble with an English template (and the
same for French).
OTOH, many companies use an English Enterprise version, and MUI packs for
other languages (like French). I'm not 100% sure if Application.Language
would return the constant for French in such a case, if the user interface
is in French... or how to determine that UI language safely if it doesn't.

Klaus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top