PhoenixLinguist
module that helps integrating linguist into phoenix
Summary↑
| default_locale(conn) | get the default locale |
| i18n(conn) | get application’s I18n module |
| params_locale(conn) | check if given locale exists |
| prefered_locale(conn) | get the prefered locale based on the input locale, session and accept-language request header |
| req_header_locale(conn) | match the prefered locale based on the accept_language http request header, and the existing I18n locales return nil if none |
| session_locale(conn) | return if exists an already set location in the session |
Functions
get the default locale
get application’s I18n module
check if given locale exists
get the prefered locale based on the input locale, session and accept-language request header
return nil if there’s none and :wrong if the params_locale doesn’t exist
match the prefered locale based on the accept_language http request header, and the existing I18n locales return nil if none
return if exists an already set location in the session