Author: bpoussin Date: 2011-01-19 17:24:40 +0100 (Wed, 19 Jan 2011) New Revision: 1842 Url: http://nuiton.org/repositories/revision/i18n/1842 Log: Anomalie #1208: Be able to force locale for translation - rename method _(Locale locale, ...) to l_(Locale locale, ...) Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18n.java Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18n.java =================================================================== --- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18n.java 2011-01-19 15:18:57 UTC (rev 1841) +++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18n.java 2011-01-19 16:24:40 UTC (rev 1842) @@ -45,7 +45,7 @@ * the translation support with the init(String language) or init(String * language, String country), init(Localelocale) static methods in your main, ( * eg: I18n.init("fr","FR") ) <li> call the translate static method for each - * sentence, ( eg: I18n._("hello you !") ) <li> create a resource file for each + * sentence, ( eg: I18n.l_("hello you !") ) <li> create a resource file for each * language following the naming convention given in the * java.util.ResourceBundle javadoc and translate all the sentence. </ul> * @@ -135,7 +135,7 @@ * @return la traduction si possible ou la chaine passee en parametre * sinon. */ - public static String _(Locale locale, String message) { + public static String l_(Locale locale, String message) { // if the key to translate is null, just return null if (message == null) { @@ -159,7 +159,7 @@ * @return la traduction si possible ou la chaine passee en parametre * sinon. */ - public static String _(Locale locale, String message, Object... args) { + public static String l_(Locale locale, String message, Object... args) { // if the key to translate is null, just return null if (message == null) { @@ -196,7 +196,7 @@ */ public static String _(String message) { Locale locale = getCurrentLanguage().getLocale(); - String result = _(locale, message); + String result = l_(locale, message); return result; } @@ -211,7 +211,7 @@ */ public static String _(String message, Object... args) { Locale locale = getCurrentLanguage().getLocale(); - String result = _(locale, message, args); + String result = l_(locale, message, args); return result; } @@ -223,7 +223,7 @@ * <p/> * Par exemple : * <pre>String key = "nuitonutils.key"; - * String result = _(key)</pre> + * String result = l_(key)</pre> * fonctionnera, mais la chaine n'aura pas été marquée comme devant être * internationalisé. * <p/> @@ -257,7 +257,7 @@ * <p/> * Par exemple : * <pre>String key = "nuitonutils.key"; - * String result = _(key)</pre> + * String result = l_(key)</pre> * fonctionnera, mais la chaine n'aura pas été marquée comme devant être * internationalisé. * <p/>
participants (1)
-
bpoussin@users.nuiton.org