localization settings
-
@toggledbits wasn't expecting language localization, but date & time. From the manual:
"You can override the locale Reactor uses for both browser and host display by setting the locale key in the reactor section of reactor.yaml"
...
"By default, dates and times are displayed in the settings determined by the locale (including the order of month, day and year in date displays, and 12/24 time display)"So by setting locale in reactor.yaml I was expecting to see e.g. 24 h time format. That didn't happen and then I added time_format and date_format, but still no change?
@tunnus The
time_format
anddate_format
are no longer used, since the locale configuration now determines the date and time format. -
@tunnus The
time_format
anddate_format
are no longer used, since the locale configuration now determines the date and time format.@toggledbits okay, but any idea why using "locale: fi-FI" in reactor.yaml does not change date & time format in UI? Or should it?
FWIW, using Chrome with Finnish as preferred language (but as said, not expecting to see language impact here, only date/time formatting)
-
At the moment it's an all or nothing deal... if there's a translation file, it will accept the locale; otherwise, it just sticks to default US English.
Maybe you should write the fi-FI translation?
-
At the moment it's an all or nothing deal... if there's a translation file, it will accept the locale; otherwise, it just sticks to default US English.
Maybe you should write the fi-FI translation?
@toggledbits said in localization settings:
At the moment it's an all or nothing deal... if there's a translation file, it will accept the locale; otherwise, it just sticks to default US English.
Maybe you should write the fi-FI translation?
Might even do that
But in the meanwhile wondering if nobody else is interested to get 24 hour time display. @therealdb & @Crille ?
-
@toggledbits said in localization settings:
At the moment it's an all or nothing deal... if there's a translation file, it will accept the locale; otherwise, it just sticks to default US English.
Maybe you should write the fi-FI translation?
Might even do that
But in the meanwhile wondering if nobody else is interested to get 24 hour time display. @therealdb & @Crille ?
-
I'm working on some changes, but it may be another week. I'm swamped right now.
-
For anyone here trying to get the 24H & right date format
just add this to your reactor config file (at least v 23063 required):
reactor: ... units: metric date_format: "%d/%m/%Y" time_format: "%H:%M:%S"
Restart, hard refresh your browser and you're good to go. Thanks @toggledbits !
-
Note: you only need to do this if your locale-defined time format isn't 24 hour.
Also, the format shown by @therealdb might be normal for his locale, but not yours specifically. This config will also override the locale-defined date format; if you don't want that, set
time_format
only.Final note: Locale setting is determined by (both) the locale set for the host OS and the locale settings of your browser. This is the preferred way to set locale. Setting locale in Reactor's config is specifically not recommended.
Edit: to be clear, to get your language's preferred date and time formats, you should do the following, in the order listed:
- Configure your host system (or the Reactor docker container) and your browser for the correct locale. This may be sufficient for most uses. Make sure to re-open browser windows from the "root" of the Reactor URL (e.g. click the Reactor logo in the upper-left corner of the page).
- If the time or date format presented by correctly completing step 1 does not suit your preferences, then and only then set
date_format
and/ortime_format
in Reactor's config. - Never use the Reactor config
locale
setting; this is for developers only and is not a complete solution for getting the correct locale. Locale configuration is always inherited from (both) your host system and browser, and that is the only correct way to do it permanently.
-
Note: you only need to do this if your locale-defined time format isn't 24 hour.
Also, the format shown by @therealdb might be normal for his locale, but not yours specifically. This config will also override the locale-defined date format; if you don't want that, set
time_format
only.Final note: Locale setting is determined by (both) the locale set for the host OS and the locale settings of your browser. This is the preferred way to set locale. Setting locale in Reactor's config is specifically not recommended.
Edit: to be clear, to get your language's preferred date and time formats, you should do the following, in the order listed:
- Configure your host system (or the Reactor docker container) and your browser for the correct locale. This may be sufficient for most uses. Make sure to re-open browser windows from the "root" of the Reactor URL (e.g. click the Reactor logo in the upper-left corner of the page).
- If the time or date format presented by correctly completing step 1 does not suit your preferences, then and only then set
date_format
and/ortime_format
in Reactor's config. - Never use the Reactor config
locale
setting; this is for developers only and is not a complete solution for getting the correct locale. Locale configuration is always inherited from (both) your host system and browser, and that is the only correct way to do it permanently.
@toggledbits so with build 23063 Docker environment variable LC_ALL should work (tried with build 23049, but no success)?
-
That will change it on the host side. It has no effect on the browser settings (which are browser-dependent).
-
That will change it on the host side. It has no effect on the browser settings (which are browser-dependent).
@toggledbits yes, just wanted to confirm that with earlier builds LC_ALL was essentially ignored
-
Not ignored, just not used if there was no language file present for the selected language.
-
T toggledbits locked this topic on