Java Doc for Localization.java in  » Issue-Tracking » scarab-0.21 » org » apache » fulcrum » localization » 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 » Issue Tracking » scarab 0.21 » org.apache.fulcrum.localization 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.fulcrum.localization.Localization

Localization
abstract public class Localization (Code)

Wrapper around the TurbineLocalization Service that makes it easy to grab something from the service.

Instead of typing:

 ((LocalizationService)TurbineServices.getInstance()
 .getService(LocalizationService.SERVICE_NAME))
 .getBundle(data)
 .getString(key)
 
You need only type:
 Localization.getString(key)
 


author:
   Jon S. Stevens
author:
   Daniel Rall
author:
   Leonard Richardson
version:
   $Id: Localization.java 10193 2006-06-30 12:49:42Z dabbous $




Method Summary
public static  Stringformat(String bundleName, Locale locale, String key, Object arg1)
    
public static  Stringformat(String bundleName, Locale locale, String key, Object arg1, Object arg2)
    
public static  Stringformat(String bundleName, Locale locale, String key, Object[] args)
    
public static  ResourceBundlegetBundle(String bundleName)
     Convenience method to get a ResourceBundle based on name.
Parameters:
  bundleName - Name of bundle.
public static  ResourceBundlegetBundle(String bundleName, String languageHeader)
     Convenience method to get a ResourceBundle based on name and HTTP Accept-Language header.
Parameters:
  bundleName - Name of bundle.
Parameters:
  languageHeader - A String with the language header.
public static  ResourceBundlegetBundle(HttpServletRequest req)
     Convenience method to get a ResourceBundle based on name and HTTP Accept-Language header in HttpServletRequest.
Parameters:
  req - HttpServletRequest.
public static  ResourceBundlegetBundle(String bundleName, HttpServletRequest req)
     Convenience method to get a ResourceBundle based on name and HTTP Accept-Language header in HttpServletRequest.
Parameters:
  bundleName - Name of bundle.
Parameters:
  req - HttpServletRequest.
public static  ResourceBundlegetBundle(String bundleName, Locale locale)
     Convenience method to get a ResourceBundle based on name and Locale.
Parameters:
  bundleName - Name of bundle.
Parameters:
  locale - A Locale.
public static  StringgetDefaultBundleName()
    
public static  StringgetDefaultCountry()
    
public static  StringgetDefaultLanguage()
    
public static  LocalegetLocale(HttpServletRequest req)
    
public static  LocalegetLocale(String languageHeader)
     This method parses the Accept-Language header and attempts to create a Locale out of it.
Parameters:
  languageHeader - A String with the language header.
final protected static  LocalizationServicegetService()
     Gets the LocalizationService implementation.
public static  StringgetString(String key)
     Pulls a string out of the LocalizationService with the default locale values of what is defined in the TurbineResources.properties file for the locale.default.language and locale.default.country property values.
public static  StringgetString(Locale locale, String key)
    
public static  StringgetString(String bundleName, Locale locale, String key)
     Fetches the localized text from the specified bundle, ignoring any default bundles.
public static  StringgetString(HttpServletRequest req, String key)
     Convenience method that pulls a localized string off the LocalizationService using the ResourceBundle based on HTTP Accept-Language header in HttpServletRequest.
Parameters:
  req - The HTTP request to parse the Accept-Language of.
Parameters:
  key - Name of string.
public static  StringgetString(String key, String lang)
     Convenience method that pulls a localized string off the LocalizationService using the default ResourceBundle name defined in the TurbineResources.properties file and the specified language name in ISO format.
Parameters:
  key - Name of string.
Parameters:
  lang - Desired language for the localized string.
public static  StringgetString(String key, Locale locale)
    
public static  StringgetString(String key, HttpServletRequest req)
    
public static  voidsetBundle(String defaultBundle)
     This method sets the name of the default bundle.
public static  voidsetLocalizationService(LocalizationService service)
    



Method Detail
format
public static String format(String bundleName, Locale locale, String key, Object arg1)(Code)

See Also:   LocalizationService.format(StringLocaleStringObject)



format
public static String format(String bundleName, Locale locale, String key, Object arg1, Object arg2)(Code)

See Also:   LocalizationService.format(StringLocaleStringObjectObject)



format
public static String format(String bundleName, Locale locale, String key, Object[] args)(Code)

See Also:   LocalizationService.format(StringLocaleStringObject[])



getBundle
public static ResourceBundle getBundle(String bundleName)(Code)
Convenience method to get a ResourceBundle based on name.
Parameters:
  bundleName - Name of bundle. A localized ResourceBundle.



getBundle
public static ResourceBundle getBundle(String bundleName, String languageHeader)(Code)
Convenience method to get a ResourceBundle based on name and HTTP Accept-Language header.
Parameters:
  bundleName - Name of bundle.
Parameters:
  languageHeader - A String with the language header. A localized ResourceBundle.



getBundle
public static ResourceBundle getBundle(HttpServletRequest req)(Code)
Convenience method to get a ResourceBundle based on name and HTTP Accept-Language header in HttpServletRequest.
Parameters:
  req - HttpServletRequest. A localized ResourceBundle.



getBundle
public static ResourceBundle getBundle(String bundleName, HttpServletRequest req)(Code)
Convenience method to get a ResourceBundle based on name and HTTP Accept-Language header in HttpServletRequest.
Parameters:
  bundleName - Name of bundle.
Parameters:
  req - HttpServletRequest. A localized ResourceBundle.



getBundle
public static ResourceBundle getBundle(String bundleName, Locale locale)(Code)
Convenience method to get a ResourceBundle based on name and Locale.
Parameters:
  bundleName - Name of bundle.
Parameters:
  locale - A Locale. A localized ResourceBundle.



getDefaultBundleName
public static String getDefaultBundleName()(Code)

See Also:   LocalizationService.getDefaultBundleName



getDefaultCountry
public static String getDefaultCountry()(Code)

See Also:   LocalizationService.getDefaultCountry



getDefaultLanguage
public static String getDefaultLanguage()(Code)

See Also:   LocalizationService.getDefaultLanguage



getLocale
public static Locale getLocale(HttpServletRequest req)(Code)

See Also:   LocalizationService.getLocale(HttpServletRequest)



getLocale
public static Locale getLocale(String languageHeader)(Code)
This method parses the Accept-Language header and attempts to create a Locale out of it.
Parameters:
  languageHeader - A String with the language header. A Locale.



getService
final protected static LocalizationService getService()(Code)
Gets the LocalizationService implementation. the LocalizationService implementation.



getString
public static String getString(String key)(Code)
Pulls a string out of the LocalizationService with the default locale values of what is defined in the TurbineResources.properties file for the locale.default.language and locale.default.country property values. If those cannot be found, then the JVM defaults are used.
Parameters:
  key - Name of string. A localized String.



getString
public static String getString(Locale locale, String key)(Code)

See Also:   LocalizationService.getString(StringLocaleString)



getString
public static String getString(String bundleName, Locale locale, String key)(Code)
Fetches the localized text from the specified bundle, ignoring any default bundles.
See Also:   LocalizationService.getString(StringLocaleString)



getString
public static String getString(HttpServletRequest req, String key)(Code)
Convenience method that pulls a localized string off the LocalizationService using the ResourceBundle based on HTTP Accept-Language header in HttpServletRequest.
Parameters:
  req - The HTTP request to parse the Accept-Language of.
Parameters:
  key - Name of string. A localized string.



getString
public static String getString(String key, String lang)(Code)
Convenience method that pulls a localized string off the LocalizationService using the default ResourceBundle name defined in the TurbineResources.properties file and the specified language name in ISO format.
Parameters:
  key - Name of string.
Parameters:
  lang - Desired language for the localized string. A localized string.



getString
public static String getString(String key, Locale locale)(Code)



getString
public static String getString(String key, HttpServletRequest req)(Code)



setBundle
public static void setBundle(String defaultBundle)(Code)
This method sets the name of the default bundle.
Parameters:
  defaultBundle - Name of default bundle.
See Also:   LocalizationService.setBundle(String)



setLocalizationService
public static void setLocalizationService(LocalizationService service)(Code)



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.