mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-08 13:27:57 +00:00
[core] Support geo-navigation URL
Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
This commit is contained in:
@@ -579,6 +579,11 @@ std::string GetCurrentMapLanguage()
|
||||
return languageCode;
|
||||
}
|
||||
|
||||
std::string GetMostPreferredLang()
|
||||
{
|
||||
return std::string(StringUtf8Multilang::GetLangByCode(GetPreferredLangIndexes()[0]));
|
||||
}
|
||||
|
||||
std::vector<int8_t> GetPreferredLangIndexes()
|
||||
{
|
||||
std::vector<int8_t> langs = {};
|
||||
|
||||
@@ -25,6 +25,7 @@ std::string GetCurrentMapTwine();
|
||||
std::string Normalize(std::string_view lang);
|
||||
std::string GetCurrentNorm();
|
||||
std::string GetCurrentMapLanguage();
|
||||
std::string GetMostPreferredLang();
|
||||
std::vector<int8_t> GetPreferredLangIndexes();
|
||||
|
||||
buffer_vector<std::string, 4> const & GetSystemPreferred();
|
||||
|
||||
@@ -49,6 +49,13 @@ bool FromString<string>(string const & strIn, string & strOut)
|
||||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool FromString<std::string_view>(string const & strIn, std::string_view & strOut)
|
||||
{
|
||||
strOut = strIn;
|
||||
return true;
|
||||
}
|
||||
|
||||
namespace impl
|
||||
{
|
||||
template <class T, size_t N>
|
||||
|
||||
Reference in New Issue
Block a user