Translating the printing dialogs

Article ID: 2348
Last updated: 29 May, 2018
Article ID: 2348
Last updated: 29 May, 2018
Revision: 3
Views: 718
Posted: 31 Jan, 2011
by Dean J.
Updated: 29 May, 2018
by Gargani A.

Question

How can I localize the printing dialogs?

Answer

JViews Framework and derived products allow you to translate the printing

menus, but do not provide the translation; this means that you will have to

translate the entire labels on your own. There are several main properties

files that you will need to provide localization for all printing dialogs,

depending on the jar your application needs, these properties files are located

in the following jars:

When using the Diagrammer, JTGO or Framework APIs :

One out of jviews-framework-all.jar, jviews-framework-lib.jar,

jviews-graphic-framework.jar

and jviews-util-lib.jar (depending on which jar you are using in your

classpath)

  • ilog/views/util/print/resources/messages.properties
  • ilog/views/print/resources/messages.properties

The file ilog/views/util/print/resources/messages.properties

is also used by Gantt, Charts and Maps.

When using the Gantt API: jviews-gantt-all.jar and

jviews-gantt.jar

  • ilog/views/gantt/print/resources/messages.properties

When using the Charts API: jviews-chart-all.jar and

jviews-chart.jar

  • ilog/views/chart/print/resources/messages.properties

When using the Maps or Maps for Defense API:

jviews-maps-all.jar

  • ilog/views/maps/print/resources/messages.properties

You will have to extract the jar files, copy those files and rename them

messages_xx.properties where xx corresponds to the locale you are using (fr for

FRANCAIS, de for DEUTSCH), translate them, and then jar your custom archive

with, for example, the following command:

jar Mcf jviews-gantt-all.jar ilog META-INF

jar Mcf jviews-framework-all.jar ilog META-INF

...

Note that if you are running the samples in the JViews distribution to test

out your own resource files, you will need to remove the line

  • IlvResourceUtil.setAvailableResourceSuffixes("");

that occurs in most of the samples. For instance, in Gantt, you will find

this line at line number 56 in the shared.AbstractExample.java.

By adding those files in your jar, and setting your locale to the language

of your choice, you will have your dialog menu translated.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 2348
Last updated: 29 May, 2018
Revision: 3
Views: 718
Posted: 31 Jan, 2011 by Dean J.
Updated: 29 May, 2018 by Gargani A.
Also listed in


Others in this category