Sha256: b9ce279fa560de3d066a8c60470eb7c99749e7352e4464e4d8ac3c3459492c45
Contents?: true
Size: 501 Bytes
Versions: 46
Compression:
Stored size: 501 Bytes
Contents
# -*- coding: utf-8 -*- require 'jpmobile/lookup_context' module ActionController class Base include Jpmobile::Helpers before_filter :gettext_force_ja_for_mobile # gettextが組み込まれている場合、携帯電話からのアクセスをjaロケールに強制する。 def gettext_force_ja_for_mobile if Object.const_defined?(:GetText) and request.mobile? begin ::GetText.locale = 'ja' rescue NameError end end end end end
Version data entries
46 entries across 43 versions & 1 rubygems