localization.md 824 B

Localization

SMGUI supports localization, and for that you must gather all the strings in an array. I also suggest to create an enum for the indeces.

char *dictionary[];

You must pass this array when you open the [window]. The very first string in the array must be the window's title, the rest is up to you.

Changing the Language

int ui_settxt(ui_t *ctx, char **txtv);

You can change the language any time you want. The new txtv[] array must have exactly the same number of elements as the one you have used for initialization.

Parameter Description
ctx Pointer to UI context
txtv Strings array

Returns 0 on success, an error code otherwise.