Cutelyst
2.13.0
|
Provides a plugin to select locale based on different input parameters. More...
Classes | |
class | Cutelyst::LangSelect |
Language selection plugin. More... | |
The LangSelect plugin can set the locale (Context::setLocale()) based on different definable input parameters like cookie or session values, URL query parameters and parts of the path or the domain. It will check if the language requested by the user agent is supported by the application. If the language is not supported, it will use a fallback language. As another fallback it will try to get the locale from the Accept-Language header.
Information is logged to the cutelyst.plugin.langselect
logging category.
The plugin is linked to Cutelyst::Core
, Cutelyst::Session
and the QtNetwork module. To use it in your application, link your application to Cutelyst::Utils::LangSelect
. See LangSelect to learn how to use it.