Skip to content

Language manager

Alexanderius edited this page Jul 3, 2025 · 4 revisions

Language manager

LanguageManager is a class that provides current language information and functionality to change the current request or user language.

Properties and methods

  • Language - current request language
  • SetCookieLanguage("en") - creates a cookie language variable, which will be used on the next requests and will set the user request language
  • SetCurrentLanguage("en") - sets language only for the current request

Logic of setting language by the framework

On begin request:

  1. Set language from cookie if the AcceptCookieLanguage setting is set to true.
  2. If there is no cookie language and Simplify.Web configuration AcceptHeaderLanguage is set to true, then the HTTP request header language will be used.
  3. If header language usage is disabled, then the default language from Simplify.Web configuration will be used instead.
  4. If there is an error setting the default language, then the invariant language will be used instead.

<< Previous page Next page >>

Clone this wiki locally