Code: Select all
Name=Application English name
Name[fr]=Nom français de l'application
Name[de]=...
Name[es]=...
English being the language by default, [en] is not specified but only "Name=" and that's where the shoe pinches...
The label of the menu is displayed in English if the value does not exist in the configuration file or simply because the current language of the user is English.#! /bin/sh
export test_GUI="<window>
<menubar>
<menu label=\"TEST\">
<menuitem label=\"$(grep '^Name\['$LANGUE\]' /path/config_file | cut -d'=' -f2) ${label="$(grep '^Name=' /path/config_file | cut -d'=' -f2)"}\">
</menuitem>
</menu>
</menubar>
</window>"
gtkdialog --program=test_GUI --center
But on the other hand, both labels (current language and English) are displayed simultaneously when the value exists!
I just want the current language label to be displayed.
How could I solve this?
Hard to explain in English...
Thank you for your attention!
Cordialement.