Sha256: 93d0c3697ca470a9ab94664831c827a93f69b5fc01e27dba6c4e4c90cb1b44c9
Contents?: true
Size: 506 Bytes
Versions: 40
Compression:
Stored size: 506 Bytes
Contents
# Localization The localization middleware uses the `Accept-Language` header to guess the preferred locale out of the given options. If a request path maps to a resource, that resource is returned. Otherwise, a localized request is made. ```ruby use Utopia::Localization, :default_locale => 'en', :locales => ['en', 'de', 'ja', 'zh'] ``` Somewhere further down the chain, you can localize a resource: ```ruby localization = Utopia::Localization[request] show_welcome(localization.current_locale) ```
Version data entries
40 entries across 40 versions & 1 rubygems