Tobago Demo

Menu

Locale

Tobago supports internationalization and localization.
  • Unicode is used internally.
  • Content in different languages can be provided by resource bundles.
  • Like content, images and scripts can be localized.
Some content of the demo is not translated!

The localization of JSF works with Java resource bundles. These bundles needs to be definded in the faces-config.xml under the section <resource-bundle>.

The image url will be evaluated by the Java Bean LocaleController.

Tobago comes with a resource bundle org.apache.myfaces.tobago.context.TobagoResourceBundle mapped to tobagoResourceBundle. This bundle contails translated text fragments used by Tobago e. g. for label of components. It's easy to expand this bundle to support more languages.

The next table shows the keys and the translation with the locale of the current session. The locale can be changed with the selector above.

Key Value
sheet.setPage Click here, to change the displayed page
sheet.empty No rows available
severity.error Error
sheet.prev Previous Page
sheet.next Next Page
alert.close Close
sheet.pageX Page {0}
severity.fatal Fatal
help.title Help
sheet.rowX Row {0}
sheet.selectAll Select all
sheet.rowXofZ Row {0} of {2}
date.week Week
sheet.rowXtoYofZ Rows {0} to {1} of {2}
severity.info Information
sheet.descending Descending
date.today Today
sheet.toPage Page {0}
sheet.pageXtoY Page {0}
sheet.setRow Click here, to change the first displayed row
date.now Now
date.cancel Cancel
sheet.last Last Page
sheet.first First Page
sheet.rowXtoY Rows {0} to {1}
date.clear Clear
page.noscript This site requires JavaScript, but JavaScript is currently not activated in your browser. To enable JavaScript you may consult your browsers the documentation.
severity.warn Warning
bar.toggleNavigation Toggle navigation
sheet.ascending Ascending
sheet.sorting Click to sort this column
toast.close Close
sheet.pageXtoYofZ Page {0} of {1}
sheet.pageXofZ Page {0} of {1}
object.noframe Your user agent does not support frames or is currently configured not to display frames. However, you may visit the related document manually:
Tobago comes with a message bundle for Tobago specific (info/warn/error) messages.
Key Value
org.apache.myfaces.tobago.FileItemValidator.CONTENT_TYPE_detail The given file is not content type of ''{0}''.
org.apache.myfaces.tobago.FileItemValidator.CONTENT_TYPE Content type error
org.apache.myfaces.tobago.FileItemValidator.SIZE_LIMIT File too large
org.apache.myfaces.tobago.UISheet.SORTING Sorting not possible!
org.apache.myfaces.tobago.UISelectOne.REQUIRED Selection required
org.apache.myfaces.tobago.FileItemValidator.SIZE_LIMIT_detail The uploaded file exceeded the maximum size of {0} bytes.
org.apache.myfaces.tobago.UISheet.SORTING_COL Can't sort the column ''{0}''!
© 2005-2023 Apache Software Foundation, Licensed under the Apache License, Version 2.0.