/branches/v2.3-faux/src/org/tela_botanica/client/i18n/Messages.java |
---|
New file |
0,0 → 1,9 |
package org.tela_botanica.client.i18n; |
/** |
* Interface to represent the constants contained in resource bundle: |
* '/home/aurelien/web/cel_GWT2/src/org/tela_botanica/client/i18n/Messages.properties'. |
*/ |
public interface Messages extends com.google.gwt.i18n.client.Constants { |
} |
/branches/v2.3-faux/src/org/tela_botanica/client/i18n/I18n.java |
---|
New file |
0,0 → 1,19 |
package org.tela_botanica.client.i18n; |
import com.google.gwt.core.client.GWT; |
public class I18n { |
public I18n() { |
} |
public static VocabulaireMetadonnees getVocabulaireMetadonnees() { |
return (VocabulaireMetadonnees) GWT.create(VocabulaireMetadonnees.class); |
} |
public static Messages getMessages() { |
return (Messages) GWT.create(Messages.class); |
} |
} |
/branches/v2.3-faux/src/org/tela_botanica/client/i18n/VocabulaireMetadonnees.java |
---|
New file |
0,0 → 1,23 |
package org.tela_botanica.client.i18n; |
import com.google.gwt.i18n.client.Dictionary; |
/** |
* Interface to represent the constants contained in resource bundle: |
* '/home/aurelien/web/cel_GWT2/src/org/tela_botanica/client/i18n/VocabulaireMetadonnees.properties'. |
*/ |
public class VocabulaireMetadonnees { |
private static Dictionary traductionMetadonnees = Dictionary.getDictionary("traductionMetadonnees"); |
public static String getTraduction(String terme) { |
String traduction = null; |
terme = terme.toLowerCase(); |
terme = terme.replaceAll("-", ""); |
terme = terme.replaceAll(" ", ""); |
if(traductionMetadonnees.keySet().contains(terme)) { |
traduction = traductionMetadonnees.get(terme); |
} |
return traduction != null ? traduction : terme; |
} |
} |