[openbox] Can menu.xml use a LANG variable?
Holly Bostick
motub at planet.nl
Fri Jun 25 09:56:44 EDT 2004
tim hall wrote:
>Last Friday 25 June 2004 11:24, Holly Bostick was like:
>
>
>>So sometimes I want to boot into my desktop in Dutch so I can learn what
>>all the various commands are in that language and in general improve my
>>Dutch.
>>
>>I know that if I choose Dutch in GDM when logging in, all my apps
>>(except Firefox and Thunderbird, which have to be installed in Dutch to
>>be used in Dutch) will display Dutch menus and all, but I was wondering
>>if I can have my Root menu change as well.
>>
>>Basically, I'm wondering if a line like this:
>>
>><menu id="games-menu" label="Games">
>>
>>can be changed to something like:
>>
>><menu id="games-menu" label[en]="Games" label[nl]="Spelletjes">
>>
>>and if that is the correct way to do it, if it is actually possible to do.
>>
>>
>
>This may be distro-specific, I'm not sure.
>
>On Debian the files in /etc/menu-methods/ are of interest here. It _is_
>possible to make a translate_menus file[*], which is a gross hack and not
>recommended. You're supposed to use the i18n method, which involves .po
>files. That's about as much as I understand. Why choosing 'Dutch' doesn't
>change the entries in your root menu already, is beyond me.
>
>cheers
>
>tim hall
>[*] It's good for organising your submenus, however ;-)
>
>
>
Why would it change automatically? Since I haven't told it to? I
labelled it that particular menu "Games", and there's no reason (that I
can see, but then I know almost nothing about this) for OB to think that
just because I changed languages that the word "Games" should now appear
differently.
Until I tell it that if we're in English, I want it to say Games, but if
we're in Dutch, I want it to say "Spelletjes" (which is, of course,
"Games" in Dutch), which is what I don't know how to do.
Naturally, this does work for the GNOME main menu, if I run a
gnome-panel with the main menu available (the entries in the main menu
change to their analogues in Dutch, which is how I learn what things
like "Run Program...." are in Dutch), it kinda works for KDE (but with
KDE you have to use the i18n business within KDE or something-- I don't
use KDE much and have in fact uninstalled it).
But because the user specifies exactly how the entries in the OB root
menu are displayed, there is not necessarily a need for it to use the
LANG= variable, since if you speak/read Danish, you would enter the
entries in Danish, etc. But the docs are so sparse that it's not at all
clear if there is an ability to use more than one language with the same
configuration, and certainly no notes on how that would be done.
I suppose, if using [language] doesn't work, I could always try to make
an alternative menu.xml that would be used if the LANG= environment
variable was [nl]. Which probably would work.... if I had the faintest
idea how to write a script that would check the LANG= variable and then
tell OB which menu.xml to use. Unless I can do that in the rc.xml, which
sounds possible.
OK, a bunch of things to try, anyway, after I finish my experiments with
Devil's Pie.
Holly
More information about the openbox
mailing list