DungeonCrawl
Loading...
Searching...
No Matches
language_menu_local.h File Reference

Exposes functionality to manage the localization of the language menu. More...

Go to the source code of this file.

Enumerations

enum  language_menu_index { LANGUAGE_ENGLISH , LANGUAGE_GERMAN , MAX_LANGUAGE_MENU_STRINGS }

Functions

void update_language_menu_local (void)
 Updates the localized strings for the language menu.

Variables

char ** language_menu_strings

Detailed Description

Exposes functionality to manage the localization of the language menu.

Definition in file language_menu_local.h.

Enumeration Type Documentation

◆ language_menu_index

enum language_menu_index

Definition at line 8 of file language_menu_local.h.

8 {
9 LANGUAGE_ENGLISH,
10 LANGUAGE_GERMAN,
11
12 MAX_LANGUAGE_MENU_STRINGS
13};

Function Documentation

◆ update_language_menu_local()

void update_language_menu_local ( void )

Updates the localized strings for the language menu.

This function retrieves the localized strings for the language menu and updates the corresponding entries in the language menu strings array.

Definition at line 13 of file language_menu_local.c.

13 {
14 for (int i = 0; i < MAX_LANGUAGE_MENU_STRINGS; i++) {
15 if (language_menu_strings[i] != NULL) {
16 free(language_menu_strings[i]);
17 }
18 }
19
20 language_menu_strings[LANGUAGE_ENGLISH] = get_local_string("ENGLISH");
21 language_menu_strings[LANGUAGE_GERMAN] = get_local_string("GERMAN");
22}
char * get_local_string(const char *key)
Get the localized string for the given key.

Variable Documentation

◆ language_menu_strings

char** language_menu_strings
extern

Definition at line 11 of file language_menu_local.c.