Let's suppose you want to translate the messages of the
generated Web Help (tab labels, button tool tips, etc) to
Portuguese (language code: pt-PT
, or —recommended— more generic
pt
).
whc_install_dir/whc_template/_wh/NNmessages.js
.
The encoding used for file NNmessages.js
is
UTF-8.NNmessages.js
:var messages = [ "Contents", "Index", ... ];
The translations are found in the messageTranslations
JavaScript object. In this object, a property name specifies the target
language and the corresponding property value specifies the list of
translated messages.
Add your translation as a new property of
messageTranslations
.
var messageTranslations = { ... "pt": [ "Sumário", "Índice", ... ] };
NNmessages.js
.pt-PT
, pt-BR
, etc, is the language preferred
by the user for the user interface of the browser and/or to display Web
pages. (This setting is often found in the user preferences of the Web
browser.)