diff options
author | Arsentiy Milchakov <milcars@mapswithme.com> | 2018-09-24 11:36:34 +0300 |
---|---|---|
committer | Aleksey Belousov <beloal@users.noreply.github.com> | 2018-09-25 11:56:55 +0300 |
commit | 84e769f3c821e612846ccf329dfc314df180e13c (patch) | |
tree | 88930530339e2e54c1ddea53f7aea6b1f550ff8c /platform | |
parent | 5d9fb552e1cc821a25369e1c960c5597fbbf93b5 (diff) |
[types_strings][ios] types_strings are supported on ios
Diffstat (limited to 'platform')
-rw-r--r-- | platform/localization.mm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/platform/localization.mm b/platform/localization.mm index cb9f90de87..c397ac1dbe 100644 --- a/platform/localization.mm +++ b/platform/localization.mm @@ -1,12 +1,15 @@ #include "platform/localization.hpp" +#include <algorithm> + +#import <Foundation/Foundation.h> namespace platform { std::string GetLocalizedTypeName(std::string const & type) { - // TODO: Add code here. + auto key = "type." + type; + std::replace(key.begin(), key.end(), '-', '.'); - // Return type as is by default. - return type; + return [NSLocalizedString(@(key.c_str()), @"") UTF8String]; } } // namespace platform |