coastline 0.0.4
Loading...
Searching...
No Matches
language.h
Go to the documentation of this file.
1#pragma once
2
7
8#include <filesystem>
9#include <functional>
10#include <map>
11#include <optional>
12#include <span>
13#include <string>
14#include <string_view>
15#include <vector>
16
17namespace coastline {
18
20inline constexpr std::string_view DEFAULT_LANGUAGE = "en-us";
21
24
27
35
41
47
54
63 std::string_view currentRegion,
65
72
73} // namespace coastline
Definition assetimport.h:11
std::vector< std::string > AvailableCartridgeRegions(std::span< const std::filesystem::path > dataRoots)
std::string CartridgeRegion(const std::filesystem::path &release)
std::filesystem::path FontDirectory(const std::filesystem::path &assets, std::string_view language)
std::filesystem::path ReleaseDirectory(const std::filesystem::path &assets)
constexpr std::string_view DEFAULT_LANGUAGE
The language unless the configuration or the command line selects another.
Definition language.h:20
StringTable MergeStrings(StringTable fallback, const StringTable &language)
std::map< std::string, std::string, std::less<> > StringTable
Strings by key, in UTF-8.
Definition language.h:23
const std::string & SelectedLanguage()
std::optional< std::string > TitleScreenRegion(std::string_view choice, std::string_view currentRegion, std::span< const std::string > available)