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.