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

target | [R] |
textdomains | [R] |

### Public Class methods

each_all() {|textdomain| ...}
new(target, locale)

Initialize a TextDomainManager

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

output_charset()

Gets the current output_charset.

- Returns: output_charset.

output_charset=(charset)

Sets the current output_charset.

- charset: output_charset.
- Returns: output_charset.

textdomain(domainname)

### Public Instance methods

add_textdomain(domainname, options = {})

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| ...}

Iterate textdomains.

set_locale(locale, force = false)

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

[Validate]