HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
translation.hpp
1// Copyright Take Vos 2020-2021.
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
4
5#pragma once
6
7#include "language.hpp"
8#include "../formula/formula.hpp"
9#include "../utility/module.hpp"
10#include "../os_settings.hpp"
11#include <string>
12#include <string_view>
13#include <vector>
14#include <unordered_map>
15
16namespace hi::inline v1 {
17
18[[nodiscard]] std::string_view get_translation(
19 std::string_view msgid,
20 long long n = 0,
21 std::vector<language *> const &languages = os_settings::languages()) noexcept;
22
23void add_translation(std::string_view msgid, language const &language, std::vector<std::string> const &plural_forms) noexcept;
24
25void add_translation(
26 std::string_view msgid,
27 std::string const &language_tag,
28 std::vector<std::string> const &plural_forms) noexcept;
29
30struct po_translations;
31void add_translation(po_translations const &translations, language const &language) noexcept;
32
33} // namespace hi::inline v1
STL namespace.
DOXYGEN BUG.
Definition algorithm.hpp:13