8#ifndef TRANSLATIONMANAGER_HPP_
9#define TRANSLATIONMANAGER_HPP_
12#include <unordered_map>
39 std::string
get(
const std::string& key)
const;
48 template<
typename... Args>
49 std::string
getf(
const std::string& key, Args&&... args)
const {
50 std::string format =
get(key);
57 std::unordered_map<std::string,
Logger declaration with support for multiple log levels.
Manages game translations for all UI elements.
std::string getLanguageFilePath(Language lang) const
Get file path for a given language.
Language getCurrentLanguage() const
std::string get(const std::string &key) const
Get translated string for a key.
std::unordered_map< std::string, std::string > _translations
Map of translation keys to translated strings.
TranslationManager()=default
bool loadLanguage(Language language)
Load translations for a specific language.
std::string getf(const std::string &key, Args &&... args) const
Get translated string with format arguments.
Language _currentLanguage
Currently loaded language.
Language
Supported languages.