JLabel l = new JLabel(Resources.getString(“Zoomer.scaling_map”));
Because a project has to have one source language and a number of target languages. The source language has to be recorded in VASSAL.properties and the different target languages in VASSAL_xx.properties.
Brent Easton
Analyst/Programmer
University of Western Sydney
Email: b.easton@uws.edu.au
Related question: Are there any languages where what is a ‘Cancel’ button
in two different dialogs in English shold be an ‘X’ button in one dialog
in that language, but a ‘Y’ button in the other dialog?
In Resources.java I have also created constants for these:
public static final String VASSAL = “General.VASSAL”; //$NON-NLS-1$
public static final String ADD = “General.add”; //$NON-NLS-1$
public static final String REMOVE = “General.remove”; //$NON-NLS-1$
public static final String INSERT = “General.insert”; //$NON-NLS-1$
public static final String YES = “General.yes”; //$NON-NLS-1$
public static final String NO = “General.no”; //$NON-NLS-1$
public static final String CANCEL = “General.cancel”; //$NON-NLS-1$
So all you need to do is
Jlabel(“Yes”);
becomes
JLabel(Resources.YES);
I don’t think so. We only support a one-to-one translation. It is up to the translator to choose a suitable generic translation for ‘Cancel’ that will suit all possible dialogs.
Regards,
Brent.
Brent Easton
Analyst/Programmer
University of Western Sydney
Email: b.easton@uws.edu.au
Maybe I’m not being clear: I wasn’t asking about one-to-many translation,
I was asking whether we might ever need two keys which have the value
‘Cancel’ (say) in English, but have two distinct values in some other
language. Like, maybe in Elbonian “unfrob” is appropriate for cancelling
dialogs with fewer than 20 words in them, while in dialogs containing more
words “unfrob” would mean “cheese”, and so a different cancel word is
used in those cases.
Perhaps a different example is in order. If you had a dialog with
three buttons, “One”, “Two”, “Three”, my (extremely limited) knowledge
of Japanese tells me that the correct translations would depend on
what you’re counting, since Japanese has different counting words
for different objects. So for cases like that, having General.One,
General.Two, and General.Three would pose a problem.