From 0bc588cddcaec3713cc2d273e4590ae328b7a314 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 17 Sep 2002 06:44:10 +0000 Subject: First simple steps using possibly translated strings for the main menu. The lang.h file in CVS is meant to contain the default english strings. Generate your favourite local one using the proper language file. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2306 a1c6a512-1295-4272-9138-f99709370657 --- apps/lang.h | 10 ++++++++++ apps/main_menu.c | 8 +++++--- 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 apps/lang.h diff --git a/apps/lang.h b/apps/lang.h new file mode 100644 index 0000000000..b56e4ab337 --- /dev/null +++ b/apps/lang.h @@ -0,0 +1,10 @@ +/* This file was automaticly generated using genlan */ +/* + * The str() macro/functions is how to access strings that might be + * translated. Use it like str(MACRO) and except a string to be + * returned! + */ +#define str(x) x +#define LANG_SOUND_SETTINGS "Sound Settings" +#define LANG_GENERAL_SETTINGS "General Settings" +#define LANG_GAMES "Games" diff --git a/apps/main_menu.c b/apps/main_menu.c index 8c0b6a01f3..43a9654c39 100644 --- a/apps/main_menu.c +++ b/apps/main_menu.c @@ -38,6 +38,8 @@ #include "powermgmt.h" #include "sound_menu.h" +#include "lang.h" + #ifdef HAVE_LCD_BITMAP #include "bmp.h" #include "icons.h" @@ -206,11 +208,11 @@ Menu main_menu(void) /* main menu */ struct menu_items items[] = { - { "Sound Settings", sound_menu }, - { "General Settings", settings_menu }, + { str(LANG_SOUND_SETTINGS), sound_menu }, + { str(LANG_GENERAL_SETTINGS), settings_menu }, #ifdef HAVE_LCD_BITMAP #ifdef USE_GAMES - { "Games", games_menu }, + { str(LANG_GAMES), games_menu }, #endif #ifdef USE_DEMOS { "Demos", demo_menu }, -- cgit v1.2.3