Class | GetText::TextDomain |
In: |
lib/gettext/textdomain.rb
|
Parent: | Object |
GetText::TextDomain class manages mo-files of a textdomain.
Usually, you don‘t need to use this class directly.
Notice: This class is unstable. APIs will be changed.
CONFIG_PREFIX | = | Config::CONFIG['prefix'].gsub(/\/local/, "") | The default locale paths. | |
DEFAULT_LOCALE_PATHS | = | [ "#{Config::CONFIG['datadir']}/locale/%{locale}/LC_MESSAGES/%{name}.mo", "#{Config::CONFIG['datadir'].gsub(/\/local/, "")}/locale/%{locale}/LC_MESSAGES/%{name}.mo", "#{CONFIG_PREFIX}/share/locale/%{locale}/LC_MESSAGES/%{name}.mo", "#{CONFIG_PREFIX}/local/share/locale/%{locale}/LC_MESSAGES/%{name}.mo" |
current_locale | [R] | |
current_mo | [R] | |
locale_paths | [R] | |
name | [R] |
Add default locale path. Usually you should use GetText.add_default_locale_path instead.
Sets to check mo-file or not. See GetText::TextDoman.check_mo? for more details.
Check mo-file is modified or not, and if mo-file is modified, reload mo-file again. This is effective in debug mode. Default is false. If $DEBUG is true, mo-file is checked even if this value is false.
Creates a new GetText::TextDomain.
Gets the translated string.
Gets the translated string. (Deprecated. Don‘t call this method directly)
Compare this object has the same name, topdir and locale.
Sets a new Locale::Object.