org.nuiton.i18n.bundle
Class I18nBundleFactory

java.lang.Object
  extended by org.nuiton.i18n.bundle.I18nBundleUtil
      extended by org.nuiton.i18n.bundle.I18nBundleFactory

Deprecated. since 1.1, prefer use the I18nBundleUtil class instead.

@Deprecated
public class I18nBundleFactory
extends I18nBundleUtil

Classe qui est responsable de la detection et construction de I18nBundle.

On retrouve aussi ici des méthodes utiles de parcours de bundles.

Since:
1.0.6
Author:
tchemit

Field Summary
static String BUNDLE_DEF_LOCALES
          Deprecated.  
static String BUNDLES_FOR_LOCALE
          Deprecated.  
static String UNIQUE_BUNDLE_DEF
          Deprecated.  
static String UNIQUE_BUNDLE_ENTRY
          Deprecated.  
protected static String UNIQUE_BUNDLE_PATH
          Deprecated.  
 
Fields inherited from class org.nuiton.i18n.bundle.I18nBundleUtil
DIRECTORY_SEARCH_BUNDLE_PATTERN, EMPTY_URL_ARRAY, SEARCH_BUNDLE_PATTERN
 
Constructor Summary
I18nBundleFactory()
          Deprecated.  
 
Method Summary
static URL[] getURLs(String uniqueBundleName)
          Deprecated. since 1.1, prefer use the I18nInitializer api instead.
static Properties loadUniqueNameDefFile(String uniqueBundleName)
          Deprecated. since 1.1, prefer use the I18nInitializer api instead.
 
Methods inherited from class org.nuiton.i18n.bundle.I18nBundleUtil
addBundle, addBundleEntry, detectBundles, getBundleEntries, getBundleEntries, getBundleEntries, getBundleNames, getBundles, getLocales, getURLs, getURLsFromDirectory, getURLsFromJar, isEmpty, promuteBundle, promuteFull, promuteGeneral, promuteLanguage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNIQUE_BUNDLE_PATH

protected static String UNIQUE_BUNDLE_PATH
Deprecated. 

UNIQUE_BUNDLE_DEF

public static String UNIQUE_BUNDLE_DEF
Deprecated. 

UNIQUE_BUNDLE_ENTRY

public static String UNIQUE_BUNDLE_ENTRY
Deprecated. 

BUNDLE_DEF_LOCALES

public static String BUNDLE_DEF_LOCALES
Deprecated. 

BUNDLES_FOR_LOCALE

public static String BUNDLES_FOR_LOCALE
Deprecated. 
Constructor Detail

I18nBundleFactory

public I18nBundleFactory()
Deprecated. 
Method Detail

getURLs

@Deprecated
public static URL[] getURLs(String uniqueBundleName)
Deprecated. since 1.1, prefer use the I18nInitializer api instead.

Recherche la liste des url de toutes les resources i18n, i.e les urls des fichiers de traduction en mode uniqueBundleName.

On va d'abord rechercher un fichier /META-INF/unqiueBundleName-definition.properties

Dans ce fichier il y a une entree locales qui contient les locales du bundle

Ensuite pour chaque locale on recupere l'url du fichier :

/META-INF/uniqueBundleName-locale.properties

Exemple :

fichier de définition : /META-INF/monAppli-definition.properties locales=fr_fr,es_ES

fichiers de traduction /META-INF/monAppli-fr_FR.properties /META-INF/monAppli-es_ES.properties

Parameters:
uniqueBundleName - le nom de l'unique bundle a charger
Returns:
la liste des urls de bundle i18n

loadUniqueNameDefFile

@Deprecated
public static Properties loadUniqueNameDefFile(String uniqueBundleName)
Deprecated. since 1.1, prefer use the I18nInitializer api instead.

Parameters:
uniqueBundleName - the unique bundle name
Returns:
the properties file loaded


Copyright © 2004-2010 CodeLutin. All Rights Reserved.