Included Modules

FastGettext

Modifications:

use Iconv or FastGettext::Icvon

iconv.rb - Pseudo Iconv class. Supports Iconv.iconv, Iconv.conv.

For Matz Ruby:
If you don't have iconv but glib2, this library uses glib2 iconv functions.

For JRuby:
Use Java String class to convert strings.

Copyright (C) 2004-2007  Masao Mutoh

You may redistribute it and/or modify it under the same
license terms as Ruby.

$Id: iconv.rb,v 1.6 2007/11/08 14:21:22 mutoh Exp $

#Modifications wrapped inside FastGettext namespace to reduce conflic


Provides Iconv.iconv which normally is provided through Ruby/GLib(1) functions. This library is required for ‘gettext’. If you require ‘gettext/iconv’, it tries to call Ruby/GLib function when it doesn’t find original Iconv class(iconv.so) it adds a pseudo class.

One-click Ruby Installer for Win32 hadn’t had iconv and there hadn’t been a way to install iconv.so itself for Win32. And JRuby hadn’t had Iconv. I’ve not checked them currently, but if they’ve supported iconv now, we don’t need this anymore…

(1) Ruby/GLib is a module which is provided from Ruby-GNOME2 Project. You can get binaries for Win32(One-Click Ruby Installer). <URL: ruby-gnome2.sourceforge.jp/>

Public Instance Methods

add_text_domain(name,options) click to toggle source
# File lib/fast_gettext.rb, line 27
def add_text_domain(name,options)
  translation_repositories[name] = TranslationRepository.build(name,options)
end
locale_path() click to toggle source

some repositories know where to store their locales

# File lib/fast_gettext.rb, line 32
def locale_path
  translation_repositories[text_domain].instance_variable_get(:@options)[:path]
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.