diff options
Diffstat (limited to 'backends')
-rw-r--r-- | backends/platform/ios7/ios7_osys_main.h | 2 | ||||
-rw-r--r-- | backends/platform/ios7/ios7_osys_misc.mm | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/backends/platform/ios7/ios7_osys_main.h b/backends/platform/ios7/ios7_osys_main.h index 4fb3049d75..aa67a556b4 100644 --- a/backends/platform/ios7/ios7_osys_main.h +++ b/backends/platform/ios7/ios7_osys_main.h @@ -212,6 +212,8 @@ public: virtual bool openUrl(const Common::String &url); + virtual Common::String getSystemLanguage() const; + protected: void initVideoContext(); void updateOutputSurface(); diff --git a/backends/platform/ios7/ios7_osys_misc.mm b/backends/platform/ios7/ios7_osys_misc.mm index 8641094c47..53f11ab156 100644 --- a/backends/platform/ios7/ios7_osys_misc.mm +++ b/backends/platform/ios7/ios7_osys_misc.mm @@ -28,6 +28,13 @@ #include <UIKit/UIKit.h> #include "common/translation.h" +Common::String OSystem_iOS7::getSystemLanguage() const { + NSString *locale = [[NSLocale currentLocale] localeIdentifier]; + if (locale == nil) + return Common::String(); + return Common::String([locale cStringUsingEncoding:NSISOLatin1StringEncoding]); +} + bool OSystem_iOS7::hasTextInClipboard() { return [[UIPasteboard generalPasteboard] containsPasteboardTypes:UIPasteboardTypeListString]; } |