Converting terms
The terms that are displayed in vv-zz.json
using all caps represent where the language specific replacements should be placed.
Each term includes a replacement text for the alt value and the title value, although these are most likely going to match each other.
The alt and the title values represent the displayed text that is shown if the image fails to load or when the user hovers the mouse over the image. It can describe the icon, or in the case of PrizmDoc® for Java, what action is associated with the corresponding icon.
Supporting Accents/Special Characters
To support the translation of terms to languages that use accents or special characters, these accents/special characters must first be converted to Unicode before including it in the translation file. You may also translate the entire string to Unicode, rather than just the accents/special characters.
Example: Create a French Language Translation File
In order to illustrate how you might create a translation file, we’ll walk through an example translating a term in a French language translation file.
The two letter code for French is “
fr
”, so we will copyvv-zz.json
and rename the new filevv-fr.json
.Now that we’ve created our translation file, we’ll create a translation for the Rotate Left button.
In
vv-fr.json
, look for the corresponding value:"rotateLeft": { "alt": "ROTATELEFT.ALT", "title": "ROTATELEFT.TITLE" },
The French translation for “Rotate Left” is “Rotation à Gauche”. In this case, we will use the same value for both the alt and title values.
Converting the accents/special characters in this translation into Unicode results in “Rotation À Gauch.” Now, replace the converted result in vv-fr.json as shown below:
Using the converted results in
vv-fr.json
with:"rotateLeft": { "alt": "RotationÀ Gauche", "title": "RotationÀ Gauche" },
Now, when a user’s browser is set to display the French language, “Rotate Left” will appear as “Rotation à Gauce.”
Have questions, corrections, or concerns about this topic? Please let us know!