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

Loads and updates localized strings for the language menu UI. More...

#include "language_menu_local.h"
#include "../../local/local_handler.h"
#include <stdlib.h>

Go to the source code of this file.

Functions

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

Variables

char ** language_menu_strings = NULL

Detailed Description

Loads and updates localized strings for the language menu UI.

Definition in file language_menu_local.c.

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 = NULL

Definition at line 11 of file language_menu_local.c.