diff options
| author | Aldrik Ramaekers <aldrik.ramaekers@protonmail.com> | 2020-02-05 18:58:55 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik.ramaekers@protonmail.com> | 2020-02-05 18:58:55 +0100 |
| commit | 8c2f35bd1f18b62fff609f3a7d77d4e85b706916 (patch) | |
| tree | 93e504989bd6182b1b381f1c9bd1b46e0732169a /src/localization.h | |
| parent | ec901c42d7d5dee13b4c69e4b65fc385d8ffd3a8 (diff) | |
refactor
Diffstat (limited to 'src/localization.h')
| -rw-r--r-- | src/localization.h | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/src/localization.h b/src/localization.h deleted file mode 100644 index 4a35bf1..0000000 --- a/src/localization.h +++ /dev/null @@ -1,59 +0,0 @@ -/* -* BSD 2-Clause “Simplified” License -* Copyright (c) 2019, Aldrik Ramaekers, aldrik.ramaekers@protonmail.com -* All rights reserved. -*/ - -#ifndef INCLUDE_LOCALIZATION -#define INCLUDE_LOCALIZATION - -// https://www.science.co.il/language/Locale-codes.php - -typedef struct t_mo_entry -{ - s32 length; - s32 offset; -} mo_entry; - -typedef struct t_mo_translation -{ - s32 identifier_len; - char *identifier; - char *translation; -} mo_translation; - -typedef struct t_mo_header -{ - s32 magic_number; - s32 file_format_revision; - s32 number_of_strings; - s32 identifier_table_offset; - s32 translation_table_offset; - s32 hashtable_size; - s32 hashtable_offset; -} mo_header; - -typedef struct t_mo_file -{ - mo_header header; - array translations; - char *locale_id; - char *locale_full; - image *icon; -} mo_file; - -typedef struct t_localization -{ - array mo_files; - mo_file *active_localization; -} localization; - -localization global_localization; - -char* locale_get_id(); -char* locale_get_name(); -char* localize(const char *identifier); -bool set_locale(char *country_id); -void load_available_localizations(); - -#endif
\ No newline at end of file |
