Sha256: d07396e6eee4babd475726d5f2b0416907f41a737e057f001c774dea41a4084c

Contents?: true

Size: 821 Bytes

Versions: 1

Compression:

Stored size: 821 Bytes

Contents

=begin
  locale/jruby.rb

  Copyright (C) 2007 Masao Mutoh

  You may redistribute it and/or modify it under the same
  license terms as Ruby.

  $Id: jruby.rb,v 1.2 2007/11/08 16:44:22 mutoh Exp $
=end

require 'locale/base'
require 'java'

module Locale
  # Locale::SystemJRuby module for JRuby
  # This is a low-level class. Application shouldn't use this directly.
  module SystemJRuby
    extend SystemBase

    if java.lang.System.getProperties['os.name'].downcase =~ /windows/
      require 'locale/win32_table'

      extend SystemWin32Table
    end

    module_function
    def default_locale  #:nodoc:
      locale = java.util.Locale.getDefault
      charset = java.nio.charset.Charset.defaultCharset.name
      Locale::Object.new(locale, nil, charset)
    end
  end
  @@locale_system_module = SystemJRuby
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gettext-1.90.0 lib/locale/jruby.rb