Sha256: f8462e21fe49ad1fdbadb602a606da6e05f2ca80d191807ec95cdd68c70450be
Contents?: true
Size: 660 Bytes
Versions: 7
Compression:
Stored size: 660 Bytes
Contents
# * George Moschovitis <gm@navel.gr> # (c) 2004-2005 Navel, all rights reserved. # $Id: l10n.rb 185 2004-12-10 13:29:09Z gmosx $ require 'nitro/filters' module N # Localization support. #-- # TODO: use inflector to convert symbols to strings. #++ class Localization # This map gives the correct localization hash # for the given locale. attr_accessor :map def initialize(map = {}) @map = map end # Return the localization hash for the given # locale. def get(locale = 'en') locale || = 'en' @map[locale] end end # Localization filter module LocalizationFilter def localize @lc = @context.conf.lc.get(@session[:LC]) end end end
Version data entries
7 entries across 7 versions & 1 rubygems