]> git.mxchange.org Git - flightgear.git/blob - src/GUI/menubar.cxx
Canvas: Add new element type map for geo mapping.
[flightgear.git] / src / GUI / menubar.cxx
1 #ifdef HAVE_CONFIG_H
2 #  include <config.h>
3 #endif
4
5
6 #include "menubar.hxx"
7 #include <Main/locale.hxx>
8 #include <Main/globals.hxx>
9
10 FGMenuBar::FGMenuBar()
11 {
12     // load locale's menu resources (default and current language)
13     globals->get_locale()->loadResource("menu");
14 }
15
16 FGMenuBar::~FGMenuBar ()
17 {
18 }
19
20 const char*
21 FGMenuBar::getLocalizedLabel(SGPropertyNode* node)
22 {
23     const char* name = node->getStringValue("name", 0);
24
25     const char* translated = globals->get_locale()->getLocalizedString(name, "menu");
26     if (translated)
27         return translated;
28
29     // return default
30     return node->getStringValue("label");
31 }
32
33 // end of menubar.cxx