Locale

Hello!

I am using the newest Browsers (Edge Chromium, Google Chrome, Mozilla Firefox, Apple Safari).

All are using German as primary language. All is fine in Edge Chromium, Google Chrome and Apple Safari.

I am printing following debiug information for all of these thre browsers in my app:

                final java.util.Locale vaadinLocale  = com.vaadin.flow.component.UI.getCurrent().getLocale();
                final java.util.Locale requestLocale = com.vaadin.flow.server.VaadinService.getCurrentRequest()
                        .getLocale();

                this.logger().info("Vaadin-Locale : " + vaadinLocale);
                this.logger().info("Request-Locale: " + requestLocale);

Vaadin-Locale : de_DE
Request-Locale: de_DE

There must be a problem in Mozilla Firefox. Fpr Firefox my debug print is:

Vaadin-Locale : en_US
Request-Locale: de

Booth locales are not the same. I tried Firefox with macOS and Windows 10 (always fresh installation).

Is there a problem in Vaadin 14.1.16 or in the Firefox implemation?

Thank you very much,
Thomas

For my windows 10 system with version FF 72.0.2 (64-Bit) your code prints

Vaadin-Locale : de_AT
Request-Locale: de

for me - Vaadin 14.1.16

Hi,

in Firefox there are settings in (German) “Allgemein” → “Sprache und Erscheinungsbild” → “Sprache” → “Bevorzugte Sprachen für die Darstellung von Websites wählen”

to set the default language. You should check these.

Maybe you installed from a non-german Firefox build?

Regards