Add support for the LANGUAGE environment variable
If LANGUAGE is set, then this variable should affect labels in XFCE application menu too. If there is no translation for the first language from the variable in a .desktop file, then we should look for translation for the next languages. The same way is used in gettext.
Merge request reports
Activity
- Resolved by Gaël Bonithon
This should already be good thanks to 9f9e7390 if
xfce_textdomain()
is used by the calling code I think.
- Resolved by Gaël Bonithon
The use of GArray isn't really justified here, and complicates things unnecessarily I think, especially with the rather weird memory management you've implemented (each element of the array should rather have its own allocation: no saving on candlesticks :)).
Could you simply use a
gchar **
instead, by doingg_strsplit()
on the contents ofLANGUAGE
(andg_strfreev()
inxfce_rc_close()
)?Also please add a small function
xfce_locale_match_array()
(or whatever appropriate name you'd prefer) so you don't have to repeat the search code in this array and have more similar if statements forrc->locale
andrc->languages
.
- Resolved by Gaël Bonithon
changed milestone to %4.18.2