coastline 0.0.4
Loading...
Searching...
No Matches
language.h File Reference

UTF-8 strings, language-specific fonts, and the selected cartridge assets. More...

#include <filesystem>
#include <functional>
#include <map>
#include <optional>
#include <span>
#include <string>
#include <string_view>
#include <vector>
Include dependency graph for language.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  coastline

Typedefs

using coastline::StringTable = std::map<std::string, std::string, std::less<>>
 Strings by key, in UTF-8.

Functions

const std::string & coastline::SelectedLanguage ()
StringTable coastline::MergeStrings (StringTable fallback, const StringTable &language)
std::filesystem::path coastline::ReleaseDirectory (const std::filesystem::path &assets)
std::string coastline::CartridgeRegion (const std::filesystem::path &release)
std::vector< std::string > coastline::AvailableCartridgeRegions (std::span< const std::filesystem::path > dataRoots)
std::optional< std::string > coastline::TitleScreenRegion (std::string_view choice, std::string_view currentRegion, std::span< const std::string > available)
std::filesystem::path coastline::FontDirectory (const std::filesystem::path &assets, std::string_view language)

Variables

constexpr std::string_view coastline::DEFAULT_LANGUAGE = "en-us"
 The language unless the configuration or the command line selects another.

Detailed Description

UTF-8 strings, language-specific fonts, and the selected cartridge assets.