com.vaadin.flow.i18n.

Class TranslationFileRequestHandler

java.lang.Object
com.vaadin.flow.server.SynchronizedRequestHandler
com.vaadin.flow.i18n.TranslationFileRequestHandler

All Implemented Interfaces:

RequestHandler, Serializable

public class TranslationFileRequestHandler extends SynchronizedRequestHandler

Handles translation file requests. Translation file requests are internal requests sent by the client-side to retrieve the translation file for the specified language tag. The response contains the translations in JSON format. Also, the language tag of the retrieved translation file is included as a header with the name X-Vaadin-Retrieved-Locale. The language tag parameter langtag supports both dash and underscore as separators.

The translation file to return is determined by matching the requested locale to the available bundles with the following prioritization order:

  • Exact match
  • Language and country match
  • Language match
  • Default bundle (root bundle)

For internal use only. May be renamed or removed in a future release.

Since:

24.4

Author:

Vaadin Ltd

See Also: