Retrieve the current language or null if not set.
It will try to determine the language by:
1) Checking if result contains a forced language
2) Checking if context has a NINJA_LANG cookie with a forced language
3) Getting the first language from the Accept-Language header
The current language (fr, ja, it ...) - may be absent
Clears the current language.
This will trigger resolving language from request (Accept lang)
if not manually set.
Note: The language is set by a cookie. To delete a cookie
the max-age is set to 0. It can therefore be the case that the lang cookie
still exists in the thread. Make sure your module / app handles this properly.
Result - result clear language commands merged into result.
application.conf usually contains the following:
This little helper converts a language code
like (en, en-US etc) to a Java locale.
It takes null as input and falls back to the default language.
By convention this is the first language of application.languages.
In the case of
The default language is "en".
language - The language to check (en, en-US etc)
The Java locale or a default locale based on the first language
in your application.languages configuration.