Revision a19040bb
Added by Marc Dequènes over 15 years ago
- ID a19040bb4af535a2e65c407f76f442c7107b4ad5
lib/cyborghood/base.rb | ||
---|---|---|
|
||
class I18n
|
||
include Singleton
|
||
include GetText
|
||
|
||
def initialize
|
||
@config = Config.instance
|
||
end
|
||
|
||
def available_languages
|
||
list = ['en'] + Dir.new(L10N_DIR).select{|d| File.directory?(d) and d[0..0] != "." }
|
||
list = ['en'] + Dir.new(Config::L10N_DIR).select{|d| File.directory?(d) and d[0..0] != "." }
|
||
# local admin can restrict available languages
|
||
# (may be useful if l10n is partial due to third party plugins)
|
||
list = list & @config.i18n.restricted_language_set if @config.i18n.restricted_language_set
|
Also available in: Unified diff
[fix] correct silly mistakes