diff options
author | Daria Volvenkova <d.volvenkova@corp.mail.ru> | 2019-03-15 21:37:27 +0300 |
---|---|---|
committer | Roman Kuznetsov <r.kuznetsow@gmail.com> | 2019-03-25 15:47:46 +0300 |
commit | 0866eb821dd8c286c67e5116cda530f0b3b61be9 (patch) | |
tree | 29fc3fb026e7f06376fdb4585b8ad9ad80ae0689 /platform | |
parent | 70b26efb8c2251557dbee6d6ae86fcef628d14ee (diff) |
Added new method GetLocalizedString in platform.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/localization.hpp | 1 | ||||
-rw-r--r-- | platform/localization.mm | 5 | ||||
-rw-r--r-- | platform/localization_dummy.cpp | 7 |
3 files changed, 9 insertions, 4 deletions
diff --git a/platform/localization.hpp b/platform/localization.hpp index 2ceea64655..b73373249a 100644 --- a/platform/localization.hpp +++ b/platform/localization.hpp @@ -6,4 +6,5 @@ namespace platform { extern std::string GetLocalizedTypeName(std::string const & type); extern std::string GetLocalizedBrandName(std::string const & brand); +extern std::string GetLocalizedString(std::string const & key); } // namespace platform diff --git a/platform/localization.mm b/platform/localization.mm index 34a21889fb..da00397480 100644 --- a/platform/localization.mm +++ b/platform/localization.mm @@ -20,4 +20,9 @@ std::string GetLocalizedBrandName(std::string const & brand) auto const key = "brand." + brand; return [NSLocalizedString(@(key.c_str()), @"") UTF8String]; } + +std::string GetLocalizedString(std::string const & key) +{ + return [NSLocalizedString(@(key.c_str()), @"") UTF8String]; +} } // namespace platform diff --git a/platform/localization_dummy.cpp b/platform/localization_dummy.cpp index 9d40587cce..640415ac77 100644 --- a/platform/localization_dummy.cpp +++ b/platform/localization_dummy.cpp @@ -2,10 +2,9 @@ namespace platform { -std::string GetLocalizedTypeName(std::string const & type) -{ - return type; -} +std::string GetLocalizedTypeName(std::string const & type) { return type; } std::string GetLocalizedBrandName(std::string const & brand) { return brand; } + +std::string GetLocalizedString(std::string const & key) { return key; } } // namespace platform |