setCurrentLocale

setCurrentLocale(loc: Locale) updating;

The setCurrentLocale method of the WebSession class dynamically sets the current locale to the locale that is specified in the loc parameter. Call this method to ensure that hyperlinks in Web applications respond as expected for Web forms displayed for a translated locale.

By default, JADE determines the locale from the Web browser that is making the request.

If there is a form defined for the locale that is making the request, the HTML for that form is generated. If no form is defined, the default locale is used.

If you want to select the translation of all forms in the application from the schema default locale, regardless of the current locale of the application, set the FormsUseDefaultSchemaLocale parameter in the [Jade] section of the JADE initialization file to true.