locale-2.1.0/0000755000004100000410000000000012254073443013005 5ustar www-datawww-datalocale-2.1.0/Rakefile0000644000004100000410000000233112254073443014451 0ustar www-datawww-data# -*- mode: ruby; coding: utf-8 -*- # # Copyright (C) 2012 Kouhei Sutou # # License: Ruby's or LGPL # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . require 'rake' require 'rake/testtask' require "bundler/gem_helper" base_dir = File.expand_path(File.dirname(__FILE__)) desc "Run tests" task :default => :test class Bundler::GemHelper undef_method :version_tag def version_tag version end end helper = Bundler::GemHelper.new(base_dir) helper.install spec = helper.gemspec desc "Run tests" task :test do options = ARGV - Rake.application.top_level_tasks ruby("test/run-test.rb", *options) end locale-2.1.0/Gemfile0000644000004100000410000000144612254073443014305 0ustar www-datawww-data# -*- mode: ruby; coding: utf-8 -*- # # Copyright (C) 2012 Kouhei Sutou # # License: Ruby's or LGPL # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . source :rubygems gemspec locale-2.1.0/doc/0000755000004100000410000000000012254073443013552 5ustar www-datawww-datalocale-2.1.0/doc/text/0000755000004100000410000000000012254073443014536 5ustar www-datawww-datalocale-2.1.0/doc/text/news.md0000644000004100000410000000442412254073443016040 0ustar www-datawww-data# News ## 2.1.0: 2013-12-15 ### Fixes * Fixed a bug that memoization key hash collision on armv7hl. Memoization feature is removed for this fix. If you get performance issue. Please report it. We will solve the issue. [GitHub#3] [Reported by mtasaka] ### Thanks * mtasaka ## 2.0.9: 2013-09-20 Locale handling fix release. ### Improvements * Added license metadata to gem package. [GitHub#1] [Suggested by jordimassaguerpla] ### Fixes * Added missing .yardopts file. * Fixed a bug that wrong environment value is used. [Debian:#520181][Debian:#690572][GitHub#2] [Reported by Stefano Zacchiroli][Reported by Hleb Valoshka] ### Thanks * jordimassaguerpla * Stefano Zacchiroli * Hleb Valoshka ## 2.0.8: 2012-08-29 Package fix release. ### Fixes * Added missing .yardopts file. ## 2.0.7: 2012-08-29 Package fix release. ### Fixes * Added missing this file. [Reported by Takahiro Kambe] ### Thanks * Takahiro Kambe ## 2.0.6: 2012-08-29 Ruby 1.9 on Windows support release. ### Improvements * Worked with invalid LANGUAGE variable value. It's just ignored. [Patch by Alexey l.Froloff] [Reported by Friedrich, Axel] * Added workaround for Ruby 1.8.6. * Supported multiple `Locale.init` call in the same process. * Supportd Ruby 1.9 on Windows. * Supported `Locale.current = Locale.current`. [GitHub#mutoh/locale#5] [Debian#600713] [Reported by Martin Hradil and Hleb Valoshka] * Supported `Locale.init` on `$SAFE > 0`. [GitHub#mutoh/locale#5] [Reported by Hleb Valoshka] * Added a Rack middleware `Locale::Middleware` that initializes locale by client request. ### Tests * Fixed a problem that tests for Windows break other tests on non Windows platform. [Patch by J. Pablo Fernández] * [jruby] Fixed wrong variant format. [GitHub#mutoh/locale#5] [Patch by Hleb Valoshka] * Fixed wrong environment variable check. `LC_CTYPES` is checked instead of `LC_MESSAGES`. [GitHub#mutoh/locale#5] [Debian#520181] [Reported by Adeodato Simó] [Patch by Hleb Valoshka] ### Thanks * Masao Mutoh * Alexey l.Froloff * Friedrich, Axel * J. Pablo Fernández * Martin Hradil * Hleb Valoshka * Adeodato Simó locale-2.1.0/README.rdoc0000644000004100000410000000647112254073443014623 0ustar www-datawww-data= locale - locale for Ruby Locale gem is the pure ruby library which provides basic and general purpose APIs for localization. This library was called as "Ruby-Locale". Since 2.0.6, this library is called just "locale". You can call this library as "locale gem" or "Ruby Locale" to distinguish from other "locale"s. This library aims to support all environments which Ruby works and all kind of programs (GUI, WWW, library, etc), and becomes the hub of other i18n/l10n libs/apps to handle major locale ID standards. * Manage Locale ID(Language Tag) * Each thread has a Locale ID. * POSIX, CLDR, IETF(RFC4646, 3066(BCP47)), Win32 and Java language tags and convert the tag string to each other. * Auto detect Locale ID. POSIX(Unix/Linux/*BSD), Win32, JRuby, CGI(CGI, Rack, others). * Resources * ISO 639-3 languages * ISO 3166 region(countries). * Support Ruby 1.8.7, Ruby 1.9.1, JRuby 1.1.4. Tested on Win32 and Linux. == Website * https://github.com/ruby-gettext/locale == Requirements * Ruby-1.8.7 or later * JRuby-1.1.4 or later == Install % gem install locale == The simplest usage require 'rubygems' require 'locale' p Locale.candidates == APIs The most important APIs are defined in Locale module. * Locale.candidates - Returns the current locale candidates. * Locale.current= - Sets the current locale(in a thread). * Locale.default= - Sets the default locale(in the whole program). * Locale.set_app_language_tags - Sets the locale that is supported by the App. == License This program is licenced under the same licence as Ruby(See COPYING) or LGPL(Lesser General Public License: http://www.gnu.org/licenses/lgpl-3.0.txt). * locale/language.rb, locale/region.rb, locale/data/language.tab.gz, locale/data/region.tab.gz: * Copyright (C) 2006 Brian Pontarelli, Antonio Terceiro * Copyright (C) 2008,2009 Masao Mutoh * Others(Some files are separated from Ruby-GetText-Package-1.92.0) * Copyright (C) 2008,2009 Masao Mutoh == References === Other libraries * langtag-0.1.0 * by Martin Dürst * gettext gem * by The ruby-gettext project === Documents * The Open Group Base Specifications Issue 6 IEEE Std 1003.1, 2004 Edition Internationalization Variables * GNU `gettext' utilities - Setting the Locale through Environment Variables * BCP47 / RFC4646, RFC3066 - Tags for Identifying Languages (Keep RFC3066 compatibility) * Unicode Locale Data Markup Language (LDML) 1.6.1 Unicode Language and Locale Identifiers * JDK 6 Documentation - Java Supported Locales * Microsoft Developer Network - Locales and Languages * ISO 639 * ISO 3166 == Maintainer === Active Kouhei Sutou === Inactive Masao Mutoh locale-2.1.0/locale.gemspec0000644000004100000410000000405312254073443015613 0ustar www-datawww-data# -*- mode: ruby; coding: utf-8 -*- # # Copyright (C) 2012-2013 Kouhei Sutou # Copyright (C) 2009 Masao Mutoh # # License: Ruby's or LGPL # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . base_dir = File.dirname(__FILE__) $LOAD_PATH.unshift(File.join(base_dir, "lib")) require "locale/version" Gem::Specification.new do |s| s.name = "locale" s.version = Locale::VERSION s.summary = 'Ruby-Locale is the pure ruby library which provides basic APIs for localization.' s.description = <<-EOD Ruby-Locale is the pure ruby library which provides basic APIs for localization. EOD s.authors = ["Kouhei Sutou", "Masao Mutoh"] s.email = ["kou@clear-code.com", "mutomasa at gmail.com"] s.homepage = "https://github.com/ruby-gettext/locale" s.licenses = ["Ruby", "LGPLv3+"] s.require_paths = ["lib"] Dir.chdir(base_dir) do s.files = Dir.glob("{lib,samples}/**/*").find_all do |path| File.file?(path) end s.files += ["COPYING", "ChangeLog", "README.rdoc", "Rakefile"] s.files += ["Gemfile", "#{s.name}.gemspec", ".yardopts"] s.files += Dir.glob("doc/text/*.*") s.test_files = Dir.glob("test/test_*.rb") end s.add_development_dependency("rake") s.add_development_dependency("bundler") s.add_development_dependency("yard") s.add_development_dependency("redcarpet") s.add_development_dependency("test-unit") s.add_development_dependency("test-unit-notify") s.add_development_dependency("test-unit-rr") end locale-2.1.0/lib/0000755000004100000410000000000012254073443013553 5ustar www-datawww-datalocale-2.1.0/lib/locale.rb0000644000004100000410000002272212254073443015344 0ustar www-datawww-data=begin locale.rb - Locale module Copyright (C) 2012 Kouhei Sutou Copyright (C) 2002-2009 Masao Mutoh You may redistribute it and/or modify it under the same license terms as Ruby. Original: Ruby-GetText-Package-1.92.0. $Id: locale.rb 27 2008-12-03 15:06:50Z mutoh $ =end require 'locale/tag' require 'locale/taglist' require 'locale/driver' require 'locale/version' # Locale module manages the locale informations of the application. # These functions are the most important APIs in this library. # Almost of all i18n/l10n programs use this APIs only. module Locale @@default_tag = nil @@driver_name = nil module_function def require_driver(name) #:nodoc: require "locale/driver/#{name}" @@driver_name = name.to_sym end def create_language_tag(tag) #:nodoc: case tag when nil when Locale::Tag::Simple tag when Locale::TagList tag[0] else Locale::Tag.parse(tag) end end # Initialize Locale library. # Usually, you don't need to call this directly, because # this is called when Locale's methods are called. # # If you use this library with CGI or the kind of CGI. # You need to call Locale.init(:driver => :cgi). # # ==== For Framework designers/programers: # If your framework is for WWW, call this once like: Locale.init(:driver => :cgi). # # ==== To Application programers: # If your framework doesn't use ruby-locale and the application is for WWW, # call this once like: Locale.init(:driver => :cgi). # # ==== To Library authors: # Don't call this, even if your application is only for WWW. # # * opts: Options as a Hash. # * :driver - The driver. :cgi if you use Locale module with CGI, # nil if you use system locale. # (ex) Locale.init(:driver => :cgi) # def init(opts = {}) if opts[:driver] require_driver opts[:driver] else if /cygwin|mingw|win32/ =~ RUBY_PLATFORM require_driver 'win32' elsif /java/ =~ RUBY_PLATFORM require_driver 'jruby' else require_driver 'posix' end end end # Gets the driver module. # # Usually you don't need to call this method. # # * Returns: the driver module. def driver_module Locale.init if @@driver_name.nil? Driver::MODULES[@@driver_name] end DEFAULT_LANGUAGE_TAG = Locale::Tag::Simple.new("en") #:nodoc: # Sets the default locale as the language tag # (Locale::Tag's class or String(such as "ja_JP")). # # * tag: the default language_tag # * Returns: self. def set_default(tag) Thread.list.each do |thread| thread[:current_languages] = nil thread[:candidates_caches] = nil end @@default_tag = create_language_tag(tag) self end # Same as Locale.set_default. # # * locale: the default locale (Locale::Tag's class) or a String such as "ja-JP". # * Returns: locale. def default=(tag) set_default(tag) @@default_tag end # Gets the default locale(language tag). # # If the default language tag is not set, this returns nil. # # * Returns: the default locale (Locale::Tag's class). def default @@default_tag || DEFAULT_LANGUAGE_TAG end # Sets the locales of the current thread order by the priority. # Each thread has a current locales. # The system locale/default locale is used if the thread doesn't have current locales. # # * tag: Locale::Language::Tag's class or the language tag as a String. nil if you need to # clear current locales. # * charset: the charset (override the charset even if the locale name has charset) or nil. # * Returns: self # # (e.g.) # Locale.set_current("ja_JP.eucJP") # Locale.set_current("ja-JP") # Locale.set_current("en_AU", "en_US", ...) # Locale.set_current(Locale::Tag::Simple.new("ja", "JP"), ...) def set_current(*tags) languages = nil if tags[0] languages = Locale::TagList.new tags.each do |tag| case tag when Locale::TagList languages.concat(tag) else languages << create_language_tag(tag) end end end Thread.current[:current_languages] = languages Thread.current[:candidates_caches] = nil self end # Sets a current locale. This is a single argument version of Locale.set_current. # # * tag: the language tag such as "ja-JP" # * Returns: an Array of the current locale (Locale::Tag's class). # # Locale.current = "ja-JP" # Locale.current = "ja_JP.eucJP" def current=(tag) set_current(tag) Thread.current[:current_languages] end # Gets the current locales (Locale::Tag's class). # If the current locale is not set, this returns system/default locale. # # This method returns the current language tags even if it isn't included in app_language_tags. # # Usually, the programs should use Locale.candidates to find the correct locale, not this method. # # * Returns: an Array of the current locales (Locale::Tag's class). def current unless Thread.current[:current_languages] loc = driver_module.locales Thread.current[:current_languages] = loc ? loc : Locale::TagList.new([default]) end Thread.current[:current_languages] end # Deprecated. def get #:nodoc: current end # Deprecated. def set(tag) #:nodoc: set_current(tag) end # Returns the language tags which are variations of the current locales order by priority. # # For example, if the current locales are ["fr", "ja_JP", "en_US", "en-Latn-GB-VARIANT"], # then returns ["fr", "ja_JP", "en_US", "en-Latn-GB-VARIANT", "en_Latn_GB", "en_GB", "ja", "en"]. # "en" is the default locale(You can change it using set_default). # The default locale is added at the end of the list even if it isn't exist. # # Usually, this method is used to find the locale data as the path(or a kind of IDs). # * options: options as a Hash or nil. # * :supported_language_tags - # An Array of the language tags order by the priority. This option # restricts the locales which are supported by the library/application. # Default is nil if you don't need to restrict the locales. # (e.g.1) ["fr_FR", "en_GB", "en_US", ...] # * :type - # The type of language tag. :common, :rfc, :cldr, :posix and # :simple are available. Default value is :common def candidates(options = {}) opts = { :supported_language_tags => nil, :current => current, :type => :common, }.merge(options) Thread.current[:candidates_caches] ||= {} Thread.current[:candidates_caches][opts] ||= collect_candidates(opts[:type], opts[:current], opts[:supported_language_tags]) end # collect tag candidates. # The result is shared from all threads. def collect_candidates(type, tags, supported_tags) # :nodoc: candidate_tags = tags.collect{|v| v.send("to_#{type}").candidates} default_tags = default.send("to_#{type}").candidates if app_language_tags app_tags = app_language_tags.collect{|v| v.send("to_#{type}")}.flatten.uniq end if supported_tags supported_tags = supported_tags.collect{|v| Locale::Tag.parse(v).send("to_#{type}")}.flatten.uniq end tags = [] unless candidate_tags.empty? (0...candidate_tags[0].size).each {|i| tags += candidate_tags.collect{|v| v[i]} } end tags += default_tags tags.uniq! all_tags = nil if app_tags if supported_tags all_tags = app_tags & supported_tags else all_tags = app_tags end elsif supported_tags all_tags = supported_tags end if all_tags tags &= all_tags tags = default_tags.uniq if tags.size == 0 end Locale::TagList.new(tags) end # Gets the current charset. # # This returns the current user/system charset. This value is # read only, so you can't set it by yourself. # # * Returns: the current charset. def charset driver_module.charset || "UTF-8" end # Clear current locale. # * Returns: self def clear Thread.current[:current_languages] = nil Thread.current[:candidates_caches] = nil self end # Clear all locales and charsets of all threads. # This doesn't clear the default and app_language_tags. # Use Locale.default = nil to unset the default locale. # * Returns: self def clear_all Thread.list.each do |thread| thread[:current_languages] = nil thread[:candidates_caches] = nil end self end @@app_language_tags = nil # Set the language tags which is supported by the Application. # This value is same with supported_language_tags in Locale.candidates # to restrict the result but is the global setting. # If you set a language tag, the application works as the single locale # application. # # If the current locale is not included in app_language_tags, # Locale.default value is used. # Use Locale.set_default() to set correct language # if "en" is not included in the language tags. # # Set nil if clear the value. # # Note that the libraries/plugins shouldn't set this value. # # (e.g.) Locale.set_app_language_tags("fr_FR", "en-GB", "en_US", ...) def set_app_language_tags(*tags) if tags[0] @@app_language_tags = tags.collect{|v| Locale::Tag.parse(v)} else @@app_language_tags = nil end clear_all self end # Returns the app_language_tags. Default is nil. See set_app_language_tags for more details. def app_language_tags @@app_language_tags end end locale-2.1.0/lib/locale/0000755000004100000410000000000012254073443015012 5ustar www-datawww-datalocale-2.1.0/lib/locale/data/0000755000004100000410000000000012254073443015723 5ustar www-datawww-datalocale-2.1.0/lib/locale/data/regions.tab.gz0000644000004100000410000000411512254073443020501 0ustar www-datawww-dataHIregions.tabmWݖH:߁9fQֻ5[ FD-kwoH3?wBQ4DAW$3k+kȭv8!i95`)'f֘fa>a*K);d:O0~\s5LŠjiupђܾ패,(UPتQN#q9)c#͡{A{640=cA5𖱺J9`c/Lm54:֛tY kTLH5\`Y:+ipDy#k yb?$UR; E^ˆ2G#Ouo>=5z0rh_HX_K.{,mnUЬޞ4Gi=O|t\n)Wq:))ͅK{F2j'yaJF>Ws*_ѯ5BPx1ux2r)/phCmш" ə:QF 20F 8;q1lW4 MI'QNw쇡-)ɽALŢ?=&S8A%BY83Xx9ثw.8b :OL{U31g {T`A↯?(LbUiT|u&r/sLS~`{!6rDע:vA]s[+wAe<ĥoKc8ȳ@b'7</4UK<>OTCZV|%( #Aa df %1YCyc?,X!P`5'wR*Nu/]C9#rWleVo.4\t>ݖN)ŌW3NA4TuPZ4"/ʹ-`bmeLq}joCKP_<Ћک>[Th y 53+ؙ:q^ZUGXNl 7`} Mguw(R4J}2'hFg4j54JJϹeS%iK ;9iC1ltOm\ cg`AH]\fҭ -S b6+lN-ԓQgv`ƥI0Ljh| Z0NZU"C o( it0arGrkٓfOno /24u],#oY+jlU9w-M.,f!{ͻYlUKtygQuvI[S ۫%_=yiEڏڑ!ϴ>ixڛQDGX}m'KSo:5R{Ō|@]}~\8gM{V$)|աK*% 2R^}iq`LRV.X2iMc1'"+CJN>6#떭oU.j5P^a>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lq=A(TKW7#-PKYV+?.1PƘ%#j2wb!S/*tfrAzJ/2j+j@3&Ĝ^39npIԺf4G0{$j:@Yqiq|locale-2.1.0/lib/locale/driver.rb0000644000004100000410000000147112254073443016635 0ustar www-datawww-data# -*- coding: utf-8 -*- # # Copyright (C) 2012 Kouhei Sutou # # License: Ruby's or LGPL # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . module Locale module Driver MODULES = {} end end locale-2.1.0/lib/locale/info/0000755000004100000410000000000012254073443015745 5ustar www-datawww-datalocale-2.1.0/lib/locale/info/region.rb0000644000004100000410000000337512254073443017565 0ustar www-datawww-data# encoding: UTF-8 =begin region.rb - Locale::Info::Region class Copyright (C) 2008 Masao Mutoh First Author:: Brian Pontarelli $Id: region.rb 27 2008-12-03 15:06:50Z mutoh $ =end require 'zlib' module Locale module Info # This class models out a region/country from the ISO 3166 standard for region codes. # In ISO3166, it's called "Country" but Ruby/Locale the word "Region" instead. class Region attr_reader :code, :name # code:: The 2 or 3 digit ISO 3166 region code. # name:: The name of the region. def initialize(code, name) @code = code @name = name end def iso_region? @@regions[code] != nil end def to_s "#{code}" end end @@regions = Hash.new Zlib::GzipReader.open(File.dirname(__FILE__) + "/../data/regions.tab.gz") do |gz| gz.readlines.each do |l| l.force_encoding('UTF-8') if l.respond_to?(:force_encoding) unless l =~ /^\s*$/ parts = l.split(/\t/) region = Region.new(parts[0], parts[1].strip) @@regions[parts[0]] = region end end end module_function # Returns a hash of all the ISO regions. The hash is {String, Region} where # the string is the 2 digit region code from the ISO 3166 data. # # You need to require 'locale/info' or 'locale/region'. def regions @@regions end # Returns the region for the given code. # # You need to require 'locale/info' or 'locale/info/region'. def get_region(code) @@regions[code] end # Returns the region code is valid. # # You need to require 'locale/info' or 'locale/info/region'. def valid_region_code?(code) @@regions[code] != nil end end end locale-2.1.0/lib/locale/info/language.rb0000644000004100000410000001120312254073443020052 0ustar www-datawww-data# encoding: UTF-8 =begin language.rb - Locale::Info::Language class Copyright (C) 2008 Masao Mutoh Original Author:: Brian Pontarelli $Id: language.rb 27 2008-12-03 15:06:50Z mutoh $ =end require 'zlib' module Locale module Info # This class contains all the of the ISO information for the ISO 639-3 # languages. This class is immutable once constructed. class Language attr_reader :two_code, :three_code, :scope, :type, :name # # Constructs a new Language instance. # # * code The 2 or 3 digit ISO 639-3 language code. # * scope A single character that defines the ISO scope of the language - (I)ndividual, # (M)acrolanguage, or (S)pecial. # * type A single character that defines the ISO type of the language - (A)ncient, # (C)onstructed, (E)xtinct, (H)istorical, (L)iving, # or (S)pecial. # * name The name of the language. # def initialize(two_code, three_code, scope, type, name) @two_code, @three_code, @scope, @type, @name = two_code, three_code, scope, type, name @individual = (scope == "I") @macro = (scope == "M") @special = (scope == "S") @constructed = (type == "C") @living = (type == "L") @extinct = (type == "E") @ancient = (type == "A") @historical = (type == "H") @special_type = (type == "S") end # Returns true if the language is an individual language according to the ISO 639-3 data. def individual?; @individual; end # Returns true if the language is a macro language according to the ISO 639-3 data. def macro?; @macro; end # Returns true if the language is a special language according to the ISO 639-3 data. def special?; @special; end # Returns true if the language is a constructed language according to the ISO 639-3 data. def constructed?; @constructed; end # Returns true if the language is a living language according to the ISO 639-3 data. def living?; @living; end # Returns true if the language is an extinct language according to the ISO 639-3 data. def extinct?; @extinct; end # Returns true if the language is an ancient language according to the ISO 639-3 data. def ancient?; @ancient; end # Returns true if the language is an historical language according to the ISO 639-3 data. def historical?; @historical; end # Returns true if the language is a special type language according to the ISO 639-3 data. def special_type?; @special_type; end # Returns the two or three code. def to_s if two_code and two_code.size > 0 two_code else three_code end end # Returns this object is valid as ISO 639 data. def iso_language? @@lang_two_codes[two_code] != nil || @@lang_three_codes[three_code] != nil end end @@lang_two_codes = Hash.new @@lang_three_codes = Hash.new Zlib::GzipReader.open(File.dirname(__FILE__) + "/../data/languages.tab.gz") do |gz| gz.readlines.each do |l| l.force_encoding('UTF-8') if l.respond_to?(:force_encoding) unless l =~ /^\s*$/ parts = l.split(/\t/) lang = Language.new(parts[2], parts[0], parts[3], parts[4], parts[5].strip) @@lang_three_codes[parts[0]] = lang @@lang_two_codes[parts[2]] = lang if parts[2].length > 0 end end end module_function # Returns a hash of all the ISO languages. The hash is {String, language} where # the string is the 3 digit language code from the ISO 639 data. This contains # all of the data from the ISO 639-3 data (7600 Languages). # # Need to require 'locale/info' or 'locale/language'. def three_languages @@lang_three_codes end # Returns a hash of all the ISO languages. The hash is {String, language} where # the string is the 2 digit language code from the ISO 639-1 data. This contains # all of the data from the ISO 639-1 data (186 Languages). # # Need to require 'locale/info' or 'locale/language'. def two_languages @@lang_two_codes end # Returns the language for the given 2 or 3 digit code. # # Need to require 'locale/info' or 'locale/language'. def get_language(code) @@lang_three_codes[code] || @@lang_two_codes[code] end # Returns the language code is valid. # # Need to require 'locale/info' or 'locale/language'. def language_code?(code) get_language(code) != nil end end end locale-2.1.0/lib/locale/info.rb0000644000004100000410000000033612254073443016274 0ustar www-datawww-data=begin info.rb - Load Locale::Info::Language and Locale::Info::Region. Copyright (C) 2008 Masao Mutoh $Id: info.rb 27 2008-12-03 15:06:50Z mutoh $ =end require 'locale/info/language' require 'locale/info/region' locale-2.1.0/lib/locale/version.rb0000644000004100000410000000042012254073443017020 0ustar www-datawww-data=begin version - version information of Ruby-Locale Copyright (C) 2008 Masao Mutoh Copyright (C) 2013 Kouhei Sutou You may redistribute it and/or modify it under the same license terms as Ruby. =end module Locale VERSION = "2.1.0" end locale-2.1.0/lib/locale/middleware.rb0000644000004100000410000000240712254073443017457 0ustar www-datawww-data# Copyright (C) 2012 Kouhei Sutou # # License: Ruby's or LGPL # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . require "locale" module Locale class Middleware def initialize(application, options={}) @application = application @options = options Locale.init(:driver => :cgi) end def call(environment) request = Rack::Request.new(environment) Locale.set_request([request["lang"]], [request.cookies["lang"]], environment["HTTP_ACCEPT_LANGUAGE"], environment["HTTP_ACCEPT_CHARSET"]) @application.call(environment) end end end locale-2.1.0/lib/locale/tag.rb0000644000004100000410000000146612254073443016121 0ustar www-datawww-data=begin tag.rb - Locale::Tag module Copyright (C) 2008,2009 Masao Mutoh You may redistribute it and/or modify it under the same license terms as Ruby. =end require 'locale/tag/simple' require 'locale/tag/irregular' require 'locale/tag/common' require 'locale/tag/rfc' require 'locale/tag/cldr' require 'locale/tag/posix' module Locale # Language tag / locale identifiers. module Tag module_function # Parse a language tag/locale name and return Locale::Tag # object. # * tag: a tag as a String. e.g.) ja-Hira-JP # * Returns: a Locale::Tag subclass. def parse(tag) # Common is not used here. [Simple, Common, Rfc, Cldr, Posix].each do |parser| ret = parser.parse(tag) return ret if ret end Locale::Tag::Irregular.new(tag) end end end locale-2.1.0/lib/locale/taglist.rb0000644000004100000410000000461112254073443017010 0ustar www-datawww-data=begin taglist.rb - Locale module Copyright (C) 2008 Masao Mutoh You may redistribute it and/or modify it under the same license terms as Ruby. $Id: taglist.rb 27 2008-12-03 15:06:50Z mutoh $ =end module Locale # This provides the subclass of Array which behaves like # the first(top priority) Locale::Tag object. # "Locale.current.language" is same with "Locale.current[0].language". # # Locale.current returns an Array of Tag(s) now. # But the old Locale.current(Ruby-GetText) and Locale.get # returns Locale::Object (similier with Locale::Tag::Posix). # This is the class for backward compatibility. # # It is recommanded to use Locale.current[0] or # Locale.candidates to find the current locale instead # of this function. # class TagList < Array # Returns the top priority language. (simple) def language self[0].language end # Returns the top priority region/country. (simple) def country self[0].region end # Returns the top priority region/country. (simple) def region self[0].region end # Returns the top priority script. (common) def script self[0].script end # Returns the top priority charset. (posix) def charset top_priority_charset = nil first_tag = self[0] if first_tag.respond_to?(:charset) top_priority_charset = first_tag.charset end top_priority_charset ||= ::Locale.driver_module.charset top_priority_charset end # Returns the top priority modifier. (posix) def modifier (self[0].respond_to? :modifier) ? self[0].modifier : nil end # Returns the top priority variants.(common, rfc, cldr) def variants (self[0].respond_to? :variants) ? self[0].variants : nil end # Returns the top priority extensions.(common, rfc, cldr) def extensions (self[0].respond_to? :extensions) ? self[0].extensions : nil end # Returns the top priority privateuse(rfc) def privateuse (self[0].respond_to? :privateuse) ? self[0].privateuse : nil end def to_str self[0].to_str end def to_s self[0].to_s end def to_common self[0].to_common end def to_simple self[0].to_simple end def to_rfc self[0].to_rfc end def to_cldr self[0].to_cldr end def to_posix self[0].to_posix end end end locale-2.1.0/lib/locale/driver/0000755000004100000410000000000012254073443016305 5ustar www-datawww-datalocale-2.1.0/lib/locale/driver/jruby.rb0000644000004100000410000000372312254073443017772 0ustar www-datawww-data# -*- coding: utf-8 -*- # # Copyright (C) 2012 Kouhei Sutou # Copyright (C) 2007-2008 Masao Mutoh # # Original: Ruby-GetText-Package-1.92.0. # License: Ruby's or LGPL # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . require 'java' require "locale/driver/env" module Locale module Driver # Locale::Driver::JRuby module for JRuby # Detect the user locales and the charset. # This is a low-level class. Application shouldn't use this directly. module JRuby $stderr.puts self.name + " is loaded." if $DEBUG module_function def locales #:nodoc: locales = ::Locale::Driver::Env.locales unless locales locale = java.util.Locale.getDefault variant = locale.getVariant variants = [] if variant != nil and variant.size > 0 variants = [variant] end locales = TagList.new([Locale::Tag::Common.new(locale.getLanguage, nil, locale.getCountry, variants)]) end locales end def charset #:nodoc: charset = ::Locale::Driver::Env.charset unless charset charset = java.nio.charset.Charset.defaultCharset.name end charset end end MODULES[:jruby] = JRuby end end locale-2.1.0/lib/locale/driver/posix.rb0000644000004100000410000000355512254073443020004 0ustar www-datawww-data# -*- coding: utf-8 -*- # # Copyright (C) 2012 Kouhei Sutou # Copyright (C) 2002-2008 Masao Mutoh # # Original: Ruby-GetText-Package-1.92.0. # License: Ruby's or LGPL # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . require "locale/driver/env" module Locale # Locale::Driver::Posix module for Posix OS (Unix) # Detect the user locales and the charset. # This is a low-level class. Application shouldn't use this directly. module Driver module Posix $stderr.puts self.name + " is loaded." if $DEBUG module_function # Gets the locales from environment variables. (LANGUAGE > LC_ALL > LC_MESSAGES > LANG) # Only LANGUAGE accept plural languages such as "nl_BE; # * Returns: an Array of the locale as Locale::Tag::Posix or nil. def locales ::Locale::Driver::Env.locales end # Gets the charset from environment variable or the result of # "locale charmap" or nil. # * Returns: the system charset. def charset charset = ::Locale::Driver::Env.charset unless charset charset = `locale charmap`.strip unless $? && $?.success? charset = nil end end charset end end MODULES[:posix] = Posix end end locale-2.1.0/lib/locale/driver/win32.rb0000644000004100000410000000502712254073443017600 0ustar www-datawww-data# -*- coding: utf-8 -*- # # Copyright (C) 2012 Kouhei Sutou # Copyright (C) 2002-2010 Masao Mutoh # # Original: Ruby-GetText-Package-1.92.0. # License: Ruby's or LGPL # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . require "locale/driver/env" require "locale/driver/win32_table" require "dl/import" module Locale # Locale::Driver::Win32 module for win32. # Detect the user locales and the charset. # This is a low-level class. Application shouldn't use this directly. module Driver module Win32 module Kernel32 extend DL::Importer dlload "kernel32.dll" extern "int GetThreadLocale()" end include Win32Table $stderr.puts self.name + " is loaded." if $DEBUG @@current_locale_id = nil module_function # Gets the Win32 charset of the locale. def charset charset = ::Locale::Driver::Env.charset unless charset if locales tag = locales[0].to_rfc.to_s loc = LocaleTable.find{|v| v[1] == tag} loc = LocaleTable.find{|v| v[1] =~ /^#{locales[0].language}/} unless loc charset = loc ? loc[2] : nil else charset = "CP1252" end end charset end def thread_locale_id #:nodoc: if @@current_locale_id @@current_locale_id else Kernel32.GetThreadLocale end end def set_thread_locale_id(lcid) #:nodoc: # for testing. @@current_locale_id = lcid end def locales #:nodoc: locales = ::Locale::Driver::Env.locales unless locales lang = LocaleTable.assoc(thread_locale_id) if lang ret = Locale::Tag::Common.parse(lang[1]) locales = Locale::TagList.new([ret]) else locales = nil end end locales end end MODULES[:win32] = Win32 end end locale-2.1.0/lib/locale/driver/cgi.rb0000644000004100000410000001132512254073443017376 0ustar www-datawww-data# -*- coding: utf-8 -*- # # Copyright (C) 2012 Kouhei Sutou # Copyright (C) 2002-2008 Masao Mutoh # # Original: Ruby-GetText-Package-1.92.0. # License: Ruby's or LGPL # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . require "locale/driver" module Locale # Locale::Driver module for CGI. # Detect the user locales and the charset from CGI parameters. # This is a low-level class. Application shouldn't use this directly. module Driver module CGI $stderr.puts self.name + " is loaded." if $DEBUG module_function # Gets required locales from CGI parameters. (Based on RFC2616) # # Returns: An Array of Locale::Tag's subclasses # (QUERY_STRING "lang" > COOKIE "lang" > HTTP_ACCEPT_LANGUAGE > "en") # def locales req = Thread.current[:current_request] return nil unless req locales = [] # QUERY_STRING "lang" if langs = req[:query_langs] langs.each do |lang| locales << Locale::Tag.parse(lang) end end unless locales.size > 0 # COOKIE "lang" if langs = req[:cookie_langs] langs.each do |lang| locales << Locale::Tag.parse(lang) if lang.size > 0 end end end unless locales.size > 0 # HTTP_ACCEPT_LANGUAGE if lang = req[:accept_language] and lang.size > 0 # 10.0 is for ruby-1.8.6 which have the bug of str.to_f. # Normally, this should be 1.0. locales += lang.gsub(/\s/, "").split(/,/).map{|v| v.split(";q=")}.map{|j| [j[0], j[1] ? j[1].to_f : 10.0]}.sort{|a,b| -(a[1] <=> b[1])}.map{|v| Locale::Tag.parse(v[0])} end end locales.size > 0 ? Locale::TagList.new(locales.uniq) : nil end # Gets the charset from CGI parameters. (Based on RFC2616) # * Returns: the charset (HTTP_ACCEPT_CHARSET or nil). def charset req = Thread.current[:current_request] return nil unless req charsets = req[:accept_charset] if charsets and charsets.size > 0 num = charsets.index(',') charset = num ? charsets[0, num] : charsets charset = nil if charset == "*" else charset = nil end charset end # Set a request. # # * query_langs: An Array of QUERY_STRING value "lang". # * cookie_langs: An Array of cookie value "lang". # * accept_language: The value of HTTP_ACCEPT_LANGUAGE # * accept_charset: The value of HTTP_ACCEPT_CHARSET def set_request(query_langs, cookie_langs, accept_language, accept_charset) Locale.clear Thread.current[:current_request] = { :query_langs => query_langs, :cookie_langs => cookie_langs, :accept_language => accept_language, :accept_charset => accept_charset } self end # Clear the current request. def clear_current_request Thread.current[:current_request] = nil end end MODULES[:cgi] = CGI end module_function # Sets a request values for lang/charset. # # * query_langs: An Array of QUERY_STRING value "lang". # * cookie_langs: An Array of cookie value "lang". # * accept_language: The value of HTTP_ACCEPT_LANGUAGE # * accept_charset: The value of HTTP_ACCEPT_CHARSET def set_request(query_langs, cookie_langs, accept_language, accept_charset) driver_module.set_request(query_langs, cookie_langs, accept_language, accept_charset) self end # Sets a CGI object. This is the convenient function of set_request(). # # This method is appeared when Locale.init(:driver => :cgi) is called. # # * cgi: CGI object # * Returns: self def set_cgi(cgi) set_request(cgi.params["lang"], cgi.cookies["lang"], cgi.accept_language, cgi.accept_charset) self end # Sets a CGI object.This is the convenient function of set_request(). # # This method is appeared when Locale.init(:driver => :cgi) is called. # # * cgi: CGI object # * Returns: cgi def cgi=(cgi) set_cgi(cgi) cgi end end locale-2.1.0/lib/locale/driver/env.rb0000644000004100000410000000601412254073443017423 0ustar www-datawww-data# -*- coding: utf-8 -*- # # Copyright (C) 2012 Kouhei Sutou # Copyright (C) 2012 Hleb Valoshka # Copyright (C) 2008 Masao Mutoh # # Original: Ruby-GetText-Package-1.92.0. # License: Ruby's or LGPL # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . require 'locale/tag' require 'locale/taglist' require "locale/driver" module Locale module Driver # Locale::Driver::Env module. # Detect the user locales and the charset. # All drivers(except CGI) refer environment variables first and use it # as the locale if it's defined. # This is a low-level module. Application shouldn't use this directly. module Env module_function # Gets the locale from environment variable. # Priority order except charset is LC_ALL > LC_MESSAGES > LANG. # Priority order for charset is LC_ALL > LC_CTYPE > LANG. # Returns: the locale as Locale::Tag::Posix. def locale lc_all = Private.parse(ENV["LC_ALL"]) return lc_all if lc_all lc_messages = Private.parse(ENV["LC_MESSAGES"]) lang = Private.parse(ENV["LANG"]) tag = lc_messages || lang return nil if tag.nil? lc_ctype = Private.parse(ENV["LC_CTYPE"]) tag.charset = lc_ctype.charset if lc_ctype tag end # Gets the locales from environment variables. (LANGUAGE > LC_ALL > LC_MESSAGES > LANG) # * Returns: an Array of the locale as Locale::Tag::Posix or nil. def locales locales = ENV["LANGUAGE"] if (locales != nil and locales.size > 0) locs = locales.split(/:/).collect{|v| Locale::Tag::Posix.parse(v)}.compact if locs.size > 0 return Locale::TagList.new(locs) end elsif (loc = locale) return Locale::TagList.new([loc]) end nil end # Gets the charset from environment variables # (LC_ALL > LC_CTYPE > LANG) or return nil. # * Returns: the system charset. def charset # :nodoc: [ENV["LC_ALL"], ENV["LC_CTYPE"], ENV["LANG"]].each do |env| tag = Private.parse(env) next if tag.nil? return tag.charset end nil end module Private module_function def parse(env_value) return nil if env_value.nil? return nil if env_value.empty? Locale::Tag::Posix.parse(env_value) end end end MODULES[:env] = Env end end locale-2.1.0/lib/locale/driver/win32_table.rb0000644000004100000410000003237412254073443020754 0ustar www-datawww-data=begin win32_table.rb - Locale table for win32 Copyright (C) 2008 Masao Mutoh You may redistribute it and/or modify it under the same license terms as Ruby. Original: Ruby-GetText-Package-1.92.0. $Id: win32_table.rb 27 2008-12-03 15:06:50Z mutoh $ =end module Locale module Driver module Win32Table #http://msdn.microsoft.com/ja-jp/goglobal/bb896001(en-us).aspx #LangID, locale name, code page LocaleTable = [ [0x0036,"af","CP1252"], [0x0436,"af-ZA","CP1252"], [0x001C,"sq","CP1250"], [0x041C,"sq-AL","CP1250"], [0x0484,"gsw-FR","CP1252"], [0x045E,"am-ET","UNICODE"], [0x0001,"ar","CP1256"], [0x1401,"ar-DZ","CP1256"], [0x3C01,"ar-BH","CP1256"], [0x0C01,"ar-EG","CP1256"], [0x0801,"ar-IQ","CP1256"], [0x2C01,"ar-JO","CP1256"], [0x3401,"ar-KW","CP1256"], [0x3001,"ar-LB","CP1256"], [0x1001,"ar-LY","CP1256"], [0x1801,"ar-MA","CP1256"], [0x2001,"ar-OM","CP1256"], [0x4001,"ar-QA","CP1256"], [0x0401,"ar-SA","CP1256"], [0x2801,"ar-SY","CP1256"], [0x1C01,"ar-TN","CP1256"], [0x3801,"ar-AE","CP1256"], [0x2401,"ar-YE","CP1256"], [0x002B,"hy","UNICODE"], [0x042B,"hy-AM","UNICODE"], [0x044D,"as-IN","UNICODE"], [0x002C,"az","CP1254"], [0x082C,"az-Cyrl-AZ","CP1251"], [0x042C,"az-Latn-AZ","CP1254"], [0x046D,"ba-RU","CP1251"], [0x002D,"eu","CP1252"], [0x042D,"eu-ES","CP1252"], [0x0023,"be","CP1251"], [0x0423,"be-BY","CP1251"], [0x0845,"bn-BD","UNICODE"], [0x0445,"bn-IN","UNICODE"], [0x201A,"bs-Cyrl-BA","CP1251"], [0x141A,"bs-Latn-BA","CP1250"], [0x047E,"br-FR","CP1252"], [0x0002,"bg","CP1251"], [0x0402,"bg-BG","CP1251"], [0x0003,"ca","CP1252"], [0x0403,"ca-ES","CP1252"], [0x0C04,"zh-HK","CP950"], [0x1404,"zh-MO","CP950"], [0x0804,"zh-CN","CP936"], [0x0004,"zh-Hans","CP936"], [0x1004,"zh-SG","CP936"], [0x0404,"zh-TW","CP950"], [0x7C04,"zh-Hant","CP950"], [0x0483,"co-FR","CP1252"], [0x001A,"hr","CP1250"], [0x041A,"hr-HR","CP1250"], [0x101A,"hr-BA","CP1250"], [0x0005,"cs","CP1250"], [0x0405,"cs-CZ","CP1250"], [0x0006,"da","CP1252"], [0x0406,"da-DK","CP1252"], [0x048C,"prs-AF","CP1256"], [0x0065,"div","UNICODE"], [0x0465,"div-MV","UNICODE"], [0x0013,"nl","CP1252"], [0x0813,"nl-BE","CP1252"], [0x0413,"nl-NL","CP1252"], [0x0009,"en","CP1252"], [0x0C09,"en-AU","CP1252"], [0x2809,"en-BZ","CP1252"], [0x1009,"en-CA","CP1252"], [0x2409,"en-029","CP1252"], [0x4009,"en-IN","CP1252"], [0x1809,"en-IE","CP1252"], [0x2009,"en-JM","CP1252"], [0x4409,"en-MY","CP1252"], [0x1409,"en-NZ","CP1252"], [0x3409,"en-PH","CP1252"], [0x4809,"en-SG","CP1252"], [0x1C09,"en-ZA","CP1252"], [0x2C09,"en-TT","CP1252"], [0x0809,"en-GB","CP1252"], [0x0409,"en-US","CP1252"], [0x3009,"en-ZW","CP1252"], [0x0025,"et","CP1257"], [0x0425,"et-EE","CP1257"], [0x0038,"fo","CP1252"], [0x0438,"fo-FO","CP1252"], [0x0464,"fil-PH","CP1252"], [0x000B,"fi","CP1252"], [0x040B,"fi-FI","CP1252"], [0x000C,"fr","CP1252"], [0x080C,"fr-BE","CP1252"], [0x0C0C,"fr-CA","CP1252"], [0x040C,"fr-FR","CP1252"], [0x140C,"fr-LU","CP1252"], [0x180C,"fr-MC","CP1252"], [0x100C,"fr-CH","CP1252"], [0x0462,"fy-NL","CP1252"], [0x0056,"gl","CP1252"], [0x0456,"gl-ES","CP1252"], [0x0037,"ka","UNICODE"], [0x0437,"ka-GE","UNICODE"], [0x0007,"de","CP1252"], [0x0C07,"de-AT","CP1252"], [0x0407,"de-DE","CP1252"], [0x1407,"de-LI","CP1252"], [0x1007,"de-LU","CP1252"], [0x0807,"de-CH","CP1252"], [0x0008,"el","CP1253"], [0x0408,"el-GR","CP1253"], [0x046F,"kl-GL","CP1252"], [0x0047,"gu","UNICODE"], [0x0447,"gu-IN","UNICODE"], [0x0468,"ha-Latn-NG","CP1252"], [0x000D,"he","CP1255"], [0x040D,"he-IL","CP1255"], [0x0039,"hi","UNICODE"], [0x0439,"hi-IN","UNICODE"], [0x000E,"hu","CP1250"], [0x040E,"hu-HU","CP1250"], [0x000F,"is","CP1252"], [0x040F,"is-IS","CP1252"], [0x0470,"ig-NG","CP1252"], [0x0021,"id","CP1252"], [0x0421,"id-ID","CP1252"], [0x085D,"iu-Latn-CA","CP1252"], [0x045D,"iu-Cans-CA","UNICODE"], [0x083C,"ga-IE","CP1252"], [0x0434,"xh-ZA","CP1252"], [0x0435,"zu-ZA","CP1252"], [0x0010,"it","CP1252"], [0x0410,"it-IT","CP1252"], [0x0810,"it-CH","CP1252"], [0x0011,"ja","CP932"], [0x0411,"ja-JP","CP932"], [0x004B,"kn","UNICODE"], [0x044B,"kn-IN","UNICODE"], [0x003F,"kk","CP1251"], [0x043F,"kk-KZ","CP1251"], [0x0453,"km-KH","UNICODE"], [0x0486,"qut-GT","CP1252"], [0x0487,"rw-RW","CP1252"], [0x0041,"sw","CP1252"], [0x0441,"sw-KE","CP1252"], [0x0057,"kok","UNICODE"], [0x0457,"kok-IN","UNICODE"], [0x0012,"ko","CP949"], [0x0412,"ko-KR","CP949"], [0x0040,"ky","CP1251"], [0x0440,"ky-KG","CP1251"], [0x0454,"lo-LA","UNICODE"], [0x0026,"lv","CP1257"], [0x0426,"lv-LV","CP1257"], [0x0027,"lt","CP1257"], [0x0427,"lt-LT","CP1257"], [0x082E,"wee-DE","CP1252"], [0x046E,"lb-LU","CP1252"], [0x002F,"mk","CP1251"], [0x042F,"mk-MK","CP1251"], [0x003E,"ms","CP1252"], [0x083E,"ms-BN","CP1252"], [0x043E,"ms-MY","CP1252"], [0x044C,"ml-IN","UNICODE"], [0x043A,"mt-MT","UNICODE"], [0x0481,"mi-NZ","UNICODE"], [0x047A,"arn-CL","CP1252"], [0x004E,"mr","UNICODE"], [0x044E,"mr-IN","UNICODE"], [0x047C,"moh-CA","CP1252"], [0x0050,"mn","CP1251"], [0x0450,"mn-MN","CP1251"], [0x0850,"mn-Mong-CN","UNICODE"], [0x0461,"ne-NP","UNICODE"], [0x0014,"no","CP1252"], [0x0414,"nb-NO","CP1252"], [0x0814,"nn-NO","CP1252"], [0x0482,"oc-FR","CP1252"], [0x0448,"or-IN","UNICODE"], [0x0463,"ps-AF","UNICODE"], [0x0029,"fa","CP1256"], [0x0429,"fa-IR","CP1256"], [0x0015,"pl","CP1250"], [0x0415,"pl-PL","CP1250"], [0x0016,"pt","CP1252"], [0x0416,"pt-BR","CP1252"], [0x0816,"pt-PT","CP1252"], [0x0046,"pa","UNICODE"], [0x0446,"pa-IN","UNICODE"], [0x046B,"quz-BO","CP1252"], [0x086B,"quz-EC","CP1252"], [0x0C6B,"quz-PE","CP1252"], [0x0018,"ro","CP1250"], [0x0418,"ro-RO","CP1250"], [0x0417,"rm-CH","CP1252"], [0x0019,"ru","CP1251"], [0x0419,"ru-RU","CP1251"], [0x243B,"smn-FI","CP1252"], [0x103B,"smj-NO","CP1252"], [0x143B,"smj-SE","CP1252"], [0x0C3B,"se-FI","CP1252"], [0x043B,"se-NO","CP1252"], [0x083B,"se-SE","CP1252"], [0x203B,"sms-FI","CP1252"], [0x183B,"sma-NO","CP1252"], [0x1C3B,"sma-SE","CP1252"], [0x004F,"sa","UNICODE"], [0x044F,"sa-IN","UNICODE"], [0x7C1A,"sr","CP1251"], [0x1C1A,"sr-Cyrl-BA","CP1251"], [0x0C1A,"sr-Cyrl-SP","CP1251"], [0x181A,"sr-Latn-BA","CP1250"], [0x081A,"sr-Latn-SP","CP1250"], [0x046C,"nso-ZA","CP1252"], [0x0432,"tn-ZA","CP1252"], [0x045B,"si-LK","UNICODE"], [0x001B,"sk","CP1250"], [0x041B,"sk-SK","CP1250"], [0x0024,"sl","CP1250"], [0x0424,"sl-SI","CP1250"], [0x000A,"es","CP1252"], [0x2C0A,"es-AR","CP1252"], [0x400A,"es-BO","CP1252"], [0x340A,"es-CL","CP1252"], [0x240A,"es-CO","CP1252"], [0x140A,"es-CR","CP1252"], [0x1C0A,"es-DO","CP1252"], [0x300A,"es-EC","CP1252"], [0x440A,"es-SV","CP1252"], [0x100A,"es-GT","CP1252"], [0x480A,"es-HN","CP1252"], [0x080A,"es-MX","CP1252"], [0x4C0A,"es-NI","CP1252"], [0x180A,"es-PA","CP1252"], [0x3C0A,"es-PY","CP1252"], [0x280A,"es-PE","CP1252"], [0x500A,"es-PR","CP1252"], [0x0C0A,"es-ES","CP1252"], [0x540A,"es-US","CP1252"], [0x380A,"es-UY","CP1252"], [0x200A,"es-VE","CP1252"], [0x001D,"sv","CP1252"], [0x081D,"sv-FI","CP1252"], [0x041D,"sv-SE","CP1252"], [0x005A,"syr","UNICODE"], [0x045A,"syr-SY","UNICODE"], [0x0428,"tg-Cyrl-TJ","CP1251"], [0x085F,"tmz-Latn-DZ","CP1252"], [0x0049,"ta","UNICODE"], [0x0449,"ta-IN","UNICODE"], [0x0044,"tt","CP1251"], [0x0444,"tt-RU","CP1251"], [0x004A,"te","UNICODE"], [0x044A,"te-IN","UNICODE"], [0x001E,"th","CP874"], [0x041E,"th-TH","CP874"], [0x0451,"bo-CN","UNICODE"], [0x001F,"tr","CP1254"], [0x041F,"tr-TR","CP1254"], [0x0442,"tk-TM","CP1250"], [0x0480,"ug-CN","CP1256"], [0x0022,"uk","CP1251"], [0x0422,"uk-UA","CP1251"], [0x042E,"wen-DE","CP1252"], [0x0020,"ur","CP1256"], [0x0420,"ur-PK","CP1256"], [0x0043,"uz","CP1254"], [0x0843,"uz-Cyrl-UZ","CP1251"], [0x0443,"uz-Latn-UZ","CP1254"], [0x002A,"vi","CP1258"], [0x042A,"vi-VN","CP1258"], [0x0452,"cy-GB","CP1252"], [0x0488,"wo-SN","CP1252"], [0x0485,"sah-RU","CP1251"], [0x0478,"ii-CN","UNICODE"], [0x046A,"yo-NG","CP1252"], ] end end end locale-2.1.0/lib/locale/tag/0000755000004100000410000000000012254073443015565 5ustar www-datawww-datalocale-2.1.0/lib/locale/tag/rfc.rb0000644000004100000410000000633712254073443016675 0ustar www-datawww-data=begin locale/tag/rfc.rb - Locale::Tag::Rfc Copyright (C) 2008,2009 Masao Mutoh You may redistribute it and/or modify it under the same license terms as Ruby. =end require 'locale/tag/common' module Locale module Tag # Language tag class for RFC4646(BCP47). class Rfc < Common SINGLETON = '[a-wyz0-9]' VARIANT = "(#{ALPHANUM}{5,8}|#{DIGIT}#{ALPHANUM}{3})" EXTENSION = "(#{SINGLETON}(?:-#{ALPHANUM}{2,8})+)" PRIVATEUSE = "(x(?:-#{ALPHANUM}{1,8})+)" GRANDFATHERED = "#{ALPHA}{1,3}(?:-#{ALPHANUM}{2,8}){1,2}" TAG_RE = /\A#{LANGUAGE}(?:-#{SCRIPT})? (?:-#{REGION})?((?:-#{VARIANT})* (?:-#{EXTENSION})*(?:-#{PRIVATEUSE})?)\Z/ix attr_reader :extensions, :privateuse class << self # Parse the language tag and return the new Locale::Tag::Rfc. def parse(tag) if tag =~ /\APOSIX\Z/ # This is the special case of POSIX locale but match this regexp. nil elsif tag =~ TAG_RE lang, script, region, subtag = $1, $2, $3, $4 extensions = [] variants = [] if subtag =~ /#{PRIVATEUSE}/ subtag, privateuse = $`, $1 # Private use for CLDR. if /x-ldml(.*)/ =~ privateuse p_subtag = $1 extensions = p_subtag.scan(/(^|-)#{EXTENSION}/i).collect{|v| p_subtag.sub!(v[1], ""); v[1]} variants = p_subtag.scan(/(^|-)#{VARIANT}(?=(-|$))/i).collect{|v| v[1]} end end extensions += subtag.scan(/(^|-)#{EXTENSION}/i).collect{|v| subtag.sub!(v[1], ""); v[1]} variants += subtag.scan(/(^|-)#{VARIANT}(?=(-|$))/i).collect{|v| v[1]} ret = self.new(lang, script, region, variants, extensions, privateuse) ret.tag = tag ret else nil end end end def initialize(language, script = nil, region = nil, variants = [], extensions = [], privateuse = nil) @extensions, @privateuse = extensions, privateuse super(language, script, region, variants) end # Sets the extensions as an Array. def extensions=(val) @extensions = val end # Sets the privateuse as a String def privateuse=(val) @privateuse = val end private def convert_to(klass) if klass == Rfc klass.new(language, script, region, variants, extensions, privateuse) elsif klass == Cldr exts = {} extensions.sort.each do |v| if v =~ /^k-(#{ALPHANUM}{2,})-(.*)$/i exts[$1] = $2 end end klass.new(language, script, region, variants, exts) else super end end # Returns the language tag # -