19 #ifndef C_UTILS_LANGSELECT_H
20 #define C_UTILS_LANGSELECT_H
22 #include <Cutelyst/cutelyst_global.h>
23 #include <Cutelyst/plugin.h>
48 class LangSelectPrivate;
371 void setSupportedLocales(const
QStringList &locales);
377 void addSupportedLocale(const
QLocale &locale);
384 void addSupportedLocale(const
QString &locale);
408 void setLocalesFromDir(const
QString &path, const
QString &name, const
QString &prefix = QStringLiteral("."), const
QString &suffix = QStringLiteral(".qm"));
431 void setLocalesFromDirs(const
QString &path, const
QString &name);
442 void setQueryKey(const
QString &key);
447 void setSessionKey(const
QString &key);
452 void setCookieName(const
QString &name);
466 void setDomainMap(const
QMap<QString,
QLocale> &map);
471 void setFallbackLocale(const
QLocale &fallback);
478 void setDetectFromHeader(
bool enabled);
483 void setLanguageCodeStashKey(const QString &key = QStringLiteral("c_langselect_lang"));
489 void setLanguageDirStashKey(const QString &key = QStringLiteral("c_langselect_dir"));
514 static
bool fromUrlQuery(
Context *c, const QString &key = QString());
531 static
bool fromSession(
Context *c, const QString &key = QString());
548 static
bool fromCookie(
Context *c, const QString &name = QString());
578 static
bool fromDomain(
Context *c, const
QMap<QString, QLocale> &domainMap =
QMap<QString, QLocale>());
594 static
bool fromPath(
Context *c, const QString &locale);
606 LangSelectPrivate *const d_ptr;
611 #endif // C_UTILS_LANGSELECT_H
Language selection plugin.
The Cutelyst Application.