i18n
Translation lookup
Loading...
Searching...
No Matches
ILocale.hpp
Go to the documentation of this file.
1
11#pragma once
12
13#include <string>
14#include <concepts>
15
38class ILocale {
39public:
40
48 virtual const std::string languageCode() const = 0;
49
53 virtual ~ILocale() = default;
54};
55
66template <typename T>
67concept LocaleInterface = std::derived_from<T, ILocale>;
Base interface for all locale implementations.
Definition ILocale.hpp:37
virtual ~ILocale()=default
Virtual destructor for proper cleanup of derived classes.
virtual const std::string languageCode() const =0
Retrieve the two-letter language code of the locale.
Concept to constrain template parameters to valid locale interface and implementation.
Definition ILocale.hpp:67