Added mcollective 2.3.1 package
[packages/trusty/mcollective.git] / lib / mcollective / vendor / i18n / lib / i18n / locale / tag.rb
1 # encoding: utf-8
2
3 module I18n
4   module Locale
5     module Tag
6       autoload :Parents, 'i18n/locale/tag/parents'
7       autoload :Rfc4646, 'i18n/locale/tag/rfc4646'
8       autoload :Simple,  'i18n/locale/tag/simple'
9
10       class << self
11         # Returns the current locale tag implementation. Defaults to +I18n::Locale::Tag::Simple+.
12         def implementation
13           @@implementation ||= Simple
14         end
15
16         # Sets the current locale tag implementation. Use this to set a different locale tag implementation.
17         def implementation=(implementation)
18           @@implementation = implementation
19         end
20
21         # Factory method for locale tags. Delegates to the current locale tag implementation.
22         def tag(tag)
23           implementation.tag(tag)
24         end
25       end
26     end
27   end
28 end