Revision 42543 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.i18n/src/main/java/org/gvsig/i18n/Messages.java
Messages.java | ||
---|---|---|
281 | 281 |
* key2=value2</code> |
282 | 282 |
* where 'key1' is the key used to identify the string and must not |
283 | 283 |
* contain the '=' symbol, and 'value1' is the associated translation.</p> |
284 |
* <p<For example:</p>
|
|
284 |
* <p>For example:</p>
|
|
285 | 285 |
* <code>cancel=Cancelar |
286 | 286 |
* accept=Aceptar</code> |
287 | 287 |
* <p>Only one pair key-value is allowed per line.</p> |
... | ... | |
317 | 317 |
* <p>Adds an additional family of resource files containing some translations. |
318 | 318 |
* The search path to locate the files is provided by the dirList parameter.</p> |
319 | 319 |
* |
320 |
* <p>See {@link addResourceFamily(String, ClassLoader)} for a discussion about the |
|
320 |
* <p>See {@link #addResourceFamily(String, ClassLoader)} for a discussion about the
|
|
321 | 321 |
* format of the property files and the way to determine the candidat files |
322 | 322 |
* to load. Note that those methods are different in the way to locate the |
323 | 323 |
* candidat files. This method searches in the provided paths (<code>dirList</code> |
... | ... | |
347 | 347 |
* <p>Adds an additional family of resource files containing some translations. |
348 | 348 |
* The search path to locate the files is provided by the dir parameter.</p> |
349 | 349 |
* |
350 |
* <p>See {@link addResourceFamily(String, ClassLoader)} for a discussion about the |
|
350 |
* <p>See {@link #addResourceFamily(String, ClassLoader)} for a discussion about the
|
|
351 | 351 |
* format of the property files and the way to determine the candidat files |
352 | 352 |
* to load. Note that those methods are different in the way to locate the |
353 | 353 |
* candidat files. This method searches in the provided path (<code>dir</code> |
... | ... | |
374 | 374 |
* The search path is determined by the getResource method from the |
375 | 375 |
* provided ClassLoader.</p> |
376 | 376 |
* |
377 |
* <p>This method is identical to {@link addResourceFamily(String, ClassLoader)}, |
|
378 |
* except that it adds a <pode>callerName</code> parameter to show in the log.</p>
|
|
377 |
* <p>This method is identical to {@link #addResourceFamily(String, ClassLoader)},
|
|
378 |
* except that it adds a <code>callerName</code> parameter to show in the log.</p>
|
|
379 | 379 |
* |
380 |
* <p>See {@link addResourceFamily(String, ClassLoader)} for a discussion about the |
|
380 |
* <p>See {@link #addResourceFamily(String, ClassLoader)} for a discussion about the
|
|
381 | 381 |
* format of the property files andthe way to determine the candidat files |
382 | 382 |
* to load.</p> |
383 | 383 |
* |
... | ... | |
476 | 476 |
/** |
477 | 477 |
* <p>Adds an additional family of resource files containing some translations.</p> |
478 | 478 |
* |
479 |
* <p>This method is identical to {@link addResourceFamily(String, ClassLoader, String)}, |
|
479 |
* <p>This method is identical to {@link #addResourceFamily(String, ClassLoader, String)},
|
|
480 | 480 |
* except that it uses the caller's class loader.</p> |
481 | 481 |
* |
482 |
* <p>See {@link addResourceFamily(String, ClassLoader)} for a discussion about the |
|
482 |
* <p>See {@link #addResourceFamily(String, ClassLoader)} for a discussion about the
|
|
483 | 483 |
* format of the property files and the way to determine the candidat files |
484 | 484 |
* to load.</p> |
485 | 485 |
* |
... | ... | |
520 | 520 |
* and its associated translations are deleted.</p> |
521 | 521 |
* |
522 | 522 |
* |
523 |
* @param preferredLocales an ArrayList containing Locale objects. |
|
523 |
* @param preferredLocalesList an ArrayList containing Locale objects.
|
|
524 | 524 |
* The ArrayList represents an ordered list of preferred locales |
525 | 525 |
*/ |
526 | 526 |
public static void setPreferredLocales(ArrayList preferredLocalesList) { |
... | ... | |
543 | 543 |
|
544 | 544 |
/** |
545 | 545 |
* |
546 |
* @param locale |
|
546 | 547 |
* @deprecated use setCurrentLocale(Locale locale, Locale alternatives[]) or LocaleManager.setCurrentLocale |
547 | 548 |
*/ |
548 | 549 |
public static void setCurrentLocale(Locale locale) { |
... | ... | |
648 | 649 |
* (In other words: the number of available translation strings). |
649 | 650 |
* |
650 | 651 |
* @param lang The language for which we want to know the number of translation keys |
651 |
* return The number of translation keys for the provided language. |
|
652 |
* @return The number of translation keys for the provided language.
|
|
652 | 653 |
*/ |
653 | 654 |
protected static int size(Locale lang) { |
654 | 655 |
int numLocale = preferredLocales.indexOf(lang); |
... | ... | |
683 | 684 |
* translations, which will be (possibly) stored in a property |
684 | 685 |
* file without language suffix |
685 | 686 |
* (ie: text.properties instead of text_es.properties). |
687 |
* @return the base language name |
|
686 | 688 |
*/ |
687 | 689 |
public static String getBaseLanguage() { |
688 | 690 |
return baseLanguage; |
... | ... | |
701 | 703 |
baseLocale = new Locale(baseLanguage); |
702 | 704 |
} |
703 | 705 |
|
704 |
/* |
|
705 |
* Searches the subdirectories of the provided directory, finding |
|
706 |
* all the translation files, and constructing a list of available translations. |
|
707 |
* It reports different country codes or variants, if available. |
|
708 |
* For example, if there is an en_US translation and an en_GB translation, both |
|
709 |
* locales will be present in the Vector. |
|
710 |
* |
|
711 |
* @return |
|
712 |
*/ |
|
713 | 706 |
|
714 |
/** |
|
715 |
* |
|
716 |
* @return A Vector containing the available locales. Each element is a Locale object |
|
717 |
*/ |
|
718 |
/*public static Vector getAvailableLocales() { |
|
719 |
return _availableLocales; |
|
720 |
}*/ |
|
721 |
|
|
722 |
/** |
|
723 |
* |
|
724 |
* @return A Vector containing the available languages. Each element is an String object |
|
725 |
*/ |
|
726 |
/*public static Vector getAvailableLanguages() { |
|
727 |
Vector availableLanguages = new Vector(); |
|
728 |
Locale lang; |
|
729 |
Enumeration locales = _availableLocales.elements(); |
|
730 |
while (locales.hasMoreElements()) { |
|
731 |
lang = (Locale) locales.nextElement(); |
|
732 |
availableLanguages.add(lang.getLanguage()); |
|
733 |
} |
|
734 |
return availableLanguages; |
|
735 |
}*/ |
|
736 |
|
|
737 | 707 |
public static Properties getAllTexts(Locale lang) { |
738 | 708 |
Properties texts = new Properties(); |
739 | 709 |
getAllTexts(lang, null, texts); |
Also available in: Unified diff