HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
translation.hpp
1// Copyright 2020 Pokitec
2// All rights reserved.
3
4#pragma once
5
6#include "TTauri/Foundation/expression.hpp"
7#include "TTauri/Foundation/hash.hpp"
8#include "language.hpp"
9#include <string>
10#include <string_view>
11#include <vector>
12#include <unordered_map>
13
14namespace tt {
15
16[[nodiscard]] std::string_view get_translation(
17 std::string_view msgid,
18 long long n=0,
19 std::vector<language*> const &languages=*language::preferred_languages
20) noexcept;
21
22void add_translation(
23 std::string_view msgid,
24 language const &language,
25 std::vector<std::string> const &plural_forms
26) noexcept;
27
28void add_translation(
29 std::string_view msgid,
30 std::string const &language_tag,
31 std::vector<std::string> const &plural_forms
32) noexcept;
33
34struct po_translations;
35void add_translation(po_translations const &translations, language const &language) noexcept;
36
37}