notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r2339 - development/main/transit/util/i18n/src/main/net/dpml/i18n
- From: niclas AT hedhman.org
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r2339 - development/main/transit/util/i18n/src/main/net/dpml/i18n
- Date: Wed, 20 Apr 2005 20:03:44 -0400
Author: niclas AT hedhman.org
Date: Wed Apr 20 20:03:41 2005
New Revision: 2339
Modified:
development/main/transit/util/i18n/src/main/net/dpml/i18n/ResourceManager.java
Log:
Added more support to handle Locale in I18N ResourceManager.
Modified:
development/main/transit/util/i18n/src/main/net/dpml/i18n/ResourceManager.java
==============================================================================
---
development/main/transit/util/i18n/src/main/net/dpml/i18n/ResourceManager.java
(original)
+++
development/main/transit/util/i18n/src/main/net/dpml/i18n/ResourceManager.java
Wed Apr 20 20:03:41 2005
@@ -176,6 +176,19 @@
}
/**
+ * Retrieve resource for specified Classes package.
+ * The basename is determined by name of classes package
+ * postfixed with ".Resources".
+ *
+ * @param clazz the Class
+ * @return the Resources
+ */
+ public static final Resources getPackageResources( final Class clazz,
Locale locale )
+ {
+ return getBaseResources( getPackageResourcesBaseName( clazz ),
locale, clazz.getClassLoader() );
+ }
+
+ /**
* Retrieve resource for specified Class.
* The basename is determined by name of Class
* postfixed with "Resources".
@@ -189,6 +202,20 @@
}
/**
+ * Retrieve resource for specified Class.
+ * The basename is determined by name of Class
+ * postfixed with "Resources".
+ *
+ * @param clazz the Class
+ * @param locale the requested Locale.
+ * @return the Resources
+ */
+ public static final Resources getClassResources( final Class clazz,
Locale locale )
+ {
+ return getBaseResources( getClassResourcesBaseName( clazz ), locale,
clazz.getClassLoader() );
+ }
+
+ /**
* Retrieve resource basename for specified Classes package.
* The basename is determined by name of classes package
* postfixed with ".Resources".
- svn commit: r2339 - development/main/transit/util/i18n/src/main/net/dpml/i18n, niclas, 04/20/2005
Archive powered by MHonArc 2.6.24.