ReXGlue SDK
Loading...
Searching...
No Matches
language.h
Go to the documentation of this file.
1
17
18#pragma once
19
20#include <cstddef>
21#include <memory>
22#include <unordered_map>
23#include <vector>
24#include <format>
25#include <string>
26#include <filesystem>
27#include <optional>
28#include <string_view>
29#include <functional>
30#include <span>
31
32#include <rex/platform.h>
33#include <rex/types.h>
34#include <rex/memory.h>
36#include <rex/memory/stream.h>
38#include <rex/result.h>
39#include <rex/filesystem/xdbf.h>
40#include <rex/utility.h>
41#include <rex/module.h>
42#include <rex/title.h>
43#include <rex/ui/window.h>
44
45namespace rex {
46namespace ui {
47class IUISystem;
48} // namespace ui
49} // namespace rex
50
51namespace rex::xam {
52
61
69 std::span<const ui::HostLocale> locales);
70
73 virtual ~IXAMLanguage() = default;
74
80 [[nodiscard]] virtual rex::kernel::XLanguage DetectHostLanguage(rex::ui::IUISystem& ui) = 0;
81};
82
87
93[[nodiscard]] REX_XAM_API std::string_view GetLanguageName(rex::kernel::XLanguage language);
94
102[[nodiscard]] REX_XAM_API rex::kernel::XLanguage ParseLanguageCode(std::string_view code);
103
104} // namespace rex::xam
Definition ui_system.h:154
Definition language.h:72
Definition language.h:83
rex::kernel::XLanguage DetectHostLanguage(rex::ui::IUISystem &ui) override
Content package and language IDs.
REX_XAM_API rex::kernel::XLanguage GetLanguageForLocales(std::span< const ui::HostLocale > locales)
REX_XAM_API rex::kernel::XLanguage GetLanguageForLocale(const ui::HostLocale &locale)
REX_XAM_API std::string_view GetLanguageName(rex::kernel::XLanguage language)
REX_XAM_API rex::kernel::XLanguage ParseLanguageCode(std::string_view code)
Interfaces, factory and module declaration.
#define REX_DECLARE_INTERFACE(Name, version)
Definition module.h:114
Definition export.h:24
XLanguage
Definition content.h:156
Definition app.h:36
Platform flags, packing macros and export markers.
#define REX_XAM_API
Definition platform.h:314
Bit, byte and ring buffer streams over memory.
Definition window.h:60
Integer types, byte order wrappers and size literals.
Move only function, const propagating pointer and scope guard.