Sha256: 1a5f8922fc54096a7bcb90ebee1bcbc8d3deb9361f46212f4aeab1c83a29a324
Contents?: true
Size: 551 Bytes
Versions: 7
Compression:
Stored size: 551 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'], :nonlocalized => ['/_static/', '/_cache/'] ``` Somewhere further down the chain, you can localize a resource: ```ruby localization = Utopia::Localization[request] show_welcome(localization.current_locale) ```
Version data entries
7 entries across 7 versions & 1 rubygems