Java Doc for LocaleUtils.java in  » Net » openfire » org » jivesoftware » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » openfire » org.jivesoftware.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jivesoftware.util.LocaleUtils

LocaleUtils
public class LocaleUtils (Code)
A set of methods for retrieving and converting locale specific strings and numbers.
author:
   Jive Software




Method Summary
public static  StringgetLocalizedNumber(long number)
     Returns an internationalized String representation of the number using the default locale.
Parameters:
  number - the number to format.
public static  StringgetLocalizedNumber(long number, Locale locale)
     Returns an internationalized String representation of the number using the specified locale.
Parameters:
  number - the number to format.
Parameters:
  locale - the locale to use for formatting.
public static  StringgetLocalizedNumber(double number)
     Returns an internationalized String representation of the number using the default locale.
Parameters:
  number - the number to format.
public static  StringgetLocalizedNumber(double number, Locale locale)
     Returns an internationalized String representation of the number using the specified locale.
Parameters:
  number - the number to format.
Parameters:
  locale - the locale to use for formatting.
public static  StringgetLocalizedString(String key)
     Returns an internationalized string loaded from a resource bundle. The locale used will be the locale specified by JiveGlobals.getLocale().
Parameters:
  key - the key to use for retrieving the string from theappropriate resource bundle.
public static  StringgetLocalizedString(String key, Locale locale)
     Returns an internationalized string loaded from a resource bundle using the passed in Locale.
Parameters:
  key - the key to use for retrieving the string from theappropriate resource bundle.
Parameters:
  locale - the locale to use for retrieving the appropriatelocale-specific string.
public static  StringgetLocalizedString(String key, List arguments)
     Returns an internationalized string loaded from a resource bundle using the locale specified by JiveGlobals.getLocale() substituting the passed in arguments.
public static  StringgetLocalizedString(String key, String pluginName)
     Returns an internationalized string loaded from a resource bundle from the passed in plugin.
public static  StringgetLocalizedString(String key, String pluginName, List arguments)
     Returns an internationalized string loaded from a resource bundle from the passed in plugin.
public static  StringgetLocalizedString(String key, Locale locale, List arguments, ResourceBundle bundle)
     Returns an internationalized string loaded from a resource bundle using the passed in Locale substituting the passed in arguments.
public static  ResourceBundlegetPluginResourceBundle(String pluginName)
     Retrieve the ResourceBundle that is used with this plugin.
Parameters:
  pluginName - the name of the plugin.
public static  ResourceBundlegetResourceBundle(String baseName, Locale locale)
     Returns the specified resource bundle, which is a properties file that aids in localization of skins.
public static  String[][]getTimeZoneList()
     Returns a list of all available time zone's as a String [][].
public static  StringgetTimeZoneName(String zoneID, Locale locale)
     Returns the display name for a time zone.
public static  LocalelocaleCodeToLocale(String localeCode)
     Converts a locale string like "en", "en_US" or "en_US_win" to a Java locale object.



Method Detail
getLocalizedNumber
public static String getLocalizedNumber(long number)(Code)
Returns an internationalized String representation of the number using the default locale.
Parameters:
  number - the number to format. an internationalized String representation of the number.



getLocalizedNumber
public static String getLocalizedNumber(long number, Locale locale)(Code)
Returns an internationalized String representation of the number using the specified locale.
Parameters:
  number - the number to format.
Parameters:
  locale - the locale to use for formatting. an internationalized String representation of the number.



getLocalizedNumber
public static String getLocalizedNumber(double number)(Code)
Returns an internationalized String representation of the number using the default locale.
Parameters:
  number - the number to format. an internationalized String representation of the number.



getLocalizedNumber
public static String getLocalizedNumber(double number, Locale locale)(Code)
Returns an internationalized String representation of the number using the specified locale.
Parameters:
  number - the number to format.
Parameters:
  locale - the locale to use for formatting. an internationalized String representation of the number.



getLocalizedString
public static String getLocalizedString(String key)(Code)
Returns an internationalized string loaded from a resource bundle. The locale used will be the locale specified by JiveGlobals.getLocale().
Parameters:
  key - the key to use for retrieving the string from theappropriate resource bundle. the localized string.



getLocalizedString
public static String getLocalizedString(String key, Locale locale)(Code)
Returns an internationalized string loaded from a resource bundle using the passed in Locale.
Parameters:
  key - the key to use for retrieving the string from theappropriate resource bundle.
Parameters:
  locale - the locale to use for retrieving the appropriatelocale-specific string. the localized string.



getLocalizedString
public static String getLocalizedString(String key, List arguments)(Code)
Returns an internationalized string loaded from a resource bundle using the locale specified by JiveGlobals.getLocale() substituting the passed in arguments. Substitution is handled using the java.text.MessageFormat class.
Parameters:
  key - the key to use for retrieving the string from theappropriate resource bundle.
Parameters:
  arguments - a list of objects to use which are formatted, theninserted into the pattern at the appropriate places. the localized string.



getLocalizedString
public static String getLocalizedString(String key, String pluginName)(Code)
Returns an internationalized string loaded from a resource bundle from the passed in plugin. If the plugin name is null, the key will be looked up using the standard resource bundle.
Parameters:
  key - the key to use for retrieving the string from theappropriate resource bundle.
Parameters:
  pluginName - the name of the plugin to load the require resource bundle from. the localized string.



getLocalizedString
public static String getLocalizedString(String key, String pluginName, List arguments)(Code)
Returns an internationalized string loaded from a resource bundle from the passed in plugin. If the plugin name is null, the key will be looked up using the standard resource bundle.
Parameters:
  key - the key to use for retrieving the string from theappropriate resource bundle.
Parameters:
  pluginName - the name of the plugin to load the require resource bundle from.
Parameters:
  arguments - a list of objects to use which are formatted, theninserted into the pattern at the appropriate places. the localized string.



getLocalizedString
public static String getLocalizedString(String key, Locale locale, List arguments, ResourceBundle bundle)(Code)
Returns an internationalized string loaded from a resource bundle using the passed in Locale substituting the passed in arguments. Substitution is handled using the MessageFormat class.
Parameters:
  key - the key to use for retrieving the string from theappropriate resource bundle.
Parameters:
  locale - the locale to use for retrieving the appropriatelocale-specific string.
Parameters:
  arguments - a list of objects to use which are formatted, theninserted into the pattern at the appropriate places. the localized string.



getPluginResourceBundle
public static ResourceBundle getPluginResourceBundle(String pluginName) throws Exception(Code)
Retrieve the ResourceBundle that is used with this plugin.
Parameters:
  pluginName - the name of the plugin. the ResourceBundle used with this plugin.
throws:
  Exception - thrown if an exception occurs.



getResourceBundle
public static ResourceBundle getResourceBundle(String baseName, Locale locale)(Code)
Returns the specified resource bundle, which is a properties file that aids in localization of skins. This method is handy since it uses the class loader that other Jive classes are loaded from (hence, it can load bundles that are stored in jive.jar).
Parameters:
  baseName - the name of the resource bundle to load.
Parameters:
  locale - the desired Locale. the specified resource bundle, if it exists.



getTimeZoneList
public static String[][] getTimeZoneList()(Code)
Returns a list of all available time zone's as a String [][]. The first entry in each list item is the timeZoneID, and the second is the display name.

The list of time zones attempts to be inclusive of all of the worlds zones while being as concise as possible. For "en" language locales the name is a friendly english name. For non-"en" language locales the standard JDK name is used for the given Locale. The GMT+/- time is also included for readability. a list of time zones, as a tuple of the zime zone ID, and itsdisplay name.




getTimeZoneName
public static String getTimeZoneName(String zoneID, Locale locale)(Code)
Returns the display name for a time zone. The display name is the name specified by the Java TimeZone class for non-"en" locales or a friendly english name for "en", with the addition of the GMT offset for human readability.
Parameters:
  zoneID - the time zone to get the name for.
Parameters:
  locale - the locale to use. the display name for the time zone.



localeCodeToLocale
public static Locale localeCodeToLocale(String localeCode)(Code)
Converts a locale string like "en", "en_US" or "en_US_win" to a Java locale object. If the conversion fails, null is returned.
Parameters:
  localeCode - the locale code for a Java locale. See the java.util.Localeclass for more details.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.