Files
dusk/src/locale/localemanager.hpp
Dominic Masters 76b5c51ab6
Some checks failed
Build Dusk / build-linux (push) Failing after 1m47s
Build Dusk / build-psp (push) Failing after 1m40s
C -> CPP
2025-12-22 11:41:49 +10:00

53 lines
927 B
C++

/**
* Copyright (c) 2025 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "asset/asset.hpp"
typedef enum {
DUSK_LOCALE_EN_US,
DUSK_LOCALE_COUNT
} dusklocale_t;
typedef struct {
dusklocale_t locale;
assetlanguage_t language;
} localemanager_t;
typedef struct {
const char_t *file;
} localeinfo_t;
static const localeinfo_t LOCALE_INFOS[DUSK_LOCALE_COUNT] = {
[DUSK_LOCALE_EN_US] = {
.file = "en_US"
}
};
extern localemanager_t LOCALE;
/**
* Initialize the locale system.
*
* @return An error code if a failure occurs.
*/
errorret_t localeManagerInit();
/**
* Set the current locale.
*
* @param locale The locale to set.
* @return An error code if a failure occurs.
*/
errorret_t localeManagerSetLocale(const dusklocale_t locale);
/**
* Dispose of the locale system.
*/
void localeManagerDispose();