Sha256: 17fa2ee213b6fc02228ff7bd9a370c99a3590b65eb05b917631b733b49d10e73
Contents?: true
Size: 614 Bytes
Versions: 16
Compression:
Stored size: 614 Bytes
Contents
require 'rubygems' require 'locale' puts "Get the current locale." p Locale.current #=> Returns a language in a TagList. p Locale.charset p Locale.current.language p Locale.current[0].language #=> same result. ENV["LANGUAGE"] = "ja_JP.eucJP:fr_FR" puts "Set LANGUAGE." + ENV["LANGUAGE"] # Clear locale because the values are cached. Locale.clear p Locale.current #=> Return 2 languages in a TagList. p Locale.current[0].language p Locale.current[1].language p Locale.current.language #=> Same with Locale.current[0].language. p Locale.charset p "Locale.candidates" p Locale.current p Locale.candidates
Version data entries
16 entries across 16 versions & 1 rubygems