Method: Scrivito::UserDefinition#ui_locale

Defined in:
app/cms/scrivito/user_definition.rb

#ui_locale(language) ⇒ Object

Lets you specify the user’s in-place UI language.

Overrides auto-detection from browser language. Overrides the application-wide scrivito UI locale configuration.

Examples:

Have robert use a UI with German titles:

robert = Scrivito::User.define('robert') do |user|
  user.ui_locale('de')
end

Parameters:

  • language (String)

    a language code (e.g. ‘en’)

See Also:



220
221
222
# File 'app/cms/scrivito/user_definition.rb', line 220

def ui_locale(language)
  @ui_locale = language
end