reload_config_texts(3alleg4)
β¨ reload_config_texts β¨
okay bestie, welcome to the Allegro manual (yes, that Allegro, the game programming library, she's iconic π
). this page is all about reload_config_texts, and no cap, she's the glow-up button for your translated strings. let's get into it π«Ά
πΈ NAME πΈ
reload_config_texts β reloads the translated strings that get_config_text() hands back to you. it's giving Allegro game programming library energy, fr fr. β¨
π SYNOPSIS π
#include <allegro.h>
void reload_config_texts(const char *new_language);
like, that's the whole vibe. one include, one function, no drama. π¦
π DESCRIPTION π
so here's the tea β: this function reloads the translated strings returned by get_config_text(). and why do we care? because it lets you switch to another language in your program, at runtime. main character move, honestly. π
now, the way you drive it depends on the situation:
- if you want to modify the
[system]language configuration variable yourself, or you've switched configuration files, then you're gonna want to passNULLβ that just reloads whatever language is currently selected. lowkey the chill option. π§ - or you can pass a string containing the two letter code of the language you desire to switch to, and the function will modify the language variable for you. okay multitasking queen. π
β οΈ bestie listen to me: after you call this function, the previously returned pointers of get_config_text() will be invalid. like, dead. expired. do NOT touch them. it's giving undefined behaviour and we do not want that π
here's the example, straight from the source, no edits:
...
/* The user selects French from a language choice menu. */
reload_config_texts("FR");
see how she just pops "FR" in there? ate that. π₯
π SEE ALSO π
get_config_text(3alleg4)β the one who started it all πget_config_string(3alleg4)β her cousin, also slaying β¨
and that's the page, bestie! this was brought to you by Allegro, version 4.4.3 β reload_config_texts(3alleg4), periodt. go forth and switch languages like the icon you are πππΈπ¦π
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms