Class: GetText::TextDomainManager

Class GetText::TextDomainManager |
In: | lib/gettext/textdomainmanager.rb
Parent: | Object

Manage TextDomain (Internal use only) A class/module is able to have plural textdomains.

Methods

- add_textdomain
- each
- each_all
- new
- output_charset
- output_charset=
- set_locale
- textdomain

Included Modules

- Enumerable

Attributes

[R] | target |

Public Class methods
each_all() {|textdomain| ...} [ source ]
new(target, locale) [ source ]

Initialize a TextDomainManager

- target: a target class/module to bind this TextDomainManager.
- locale: a Locale::Object.

output_charset() [ source ]

Gets the current output_charset.

- Returns: output_charset.

output_charset=(charset) [ source ]

Sets the current output_charset.

- charset: output_charset.
- Returns: output_charset.

textdomain(domainname) [ source ]
Public Instance methods
add_textdomain(domainname, options = {}) [ source ]

Add a textdomain

- options: If they aren’t set or invalid, default values are used.
  - :path - the path to the mo-files. If not set, it will search default paths such as /usr/share/locale, /usr/local/share/locale)

each() {|textdomain| ...} [ source ]

Iterate textdomains.

set_locale(locale, force = false) [ source ]

Sets locale such as "de", "fr", "it", "ko", "ja_JP.eucJP", "zh_CN.EUC" …

Notice that you shouldn’t use this for your own Libraries.

- locale: a locale string or Locale::Object.
- force: Change locale forcely.
- Returns: self