Cleanup repo
This commit is contained in:
commit
4755371ffa
18 files changed
+20826
No files matched your search
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* @file localization.h
|
||||
* @author Piotr Krygier (everyonencancode@gmail.com)
|
||||
* @brief Simple localization header
|
||||
* @version 0.1
|
||||
* @date 2022-02-15
|
||||
*
|
||||
* @copyright Copyright (c) 2022
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LOCALIZATION_H
|
||||
#define LOCALIZATION_H
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#define SELECTED_LANGUAGE EN_US
|
||||
|
||||
#define LOCALIZE(string) string.message[SELECTED_LANGUAGE]
|
||||
|
||||
/**
|
||||
* @brief Available languages
|
||||
*
|
||||
*/
|
||||
enum Languages_t
|
||||
{
|
||||
EN_US = 0,
|
||||
LAST_LANGUAGE
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
*/
|
||||
struct MessageString_t
|
||||
{
|
||||
/**
|
||||
* @brief Maximum message length. I.e. if French version is longer than English, use French length.
|
||||
*
|
||||
*/
|
||||
size_t maxMessageLength;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Array holding list of translations for specific message
|
||||
*
|
||||
*/
|
||||
const char* const message[LAST_LANGUAGE];
|
||||
};
|
||||
|
||||
#endif /* LOCALIZATION_H */
|
||||
Reference in new issue
Block a user