Closed winterized closed 8 years ago
You should either specify the table name or use nil
for Localizable.strings
, but not an empty string ""
print(OneSkyOTAPlugin.localizedStringForKey("planning.button.today", value: "Ajd", table: "Localizable"))
2016-07-14 10:02:07.136 OTASwiftTest[51888:2445127] OneSkyOTAPlugin - checking for update.
2016-07-14 10:02:07.157 OTASwiftTest[51888:2445127] OneSkyOTAPlugin - localized string not found for key: planning.button.today, locale: hi-NZ, falling back to locale without region: hi
2016-07-14 10:02:07.157 OTASwiftTest[51888:2445127] OneSkyOTAPlugin - localized string not found for key: planning.button.today, locale: hi-NZ, falling back to development region language: en
2016-07-14 10:02:07.158 OTASwiftTest[51888:2445127] OneSkyOTAPlugin - localized string found for key: planning.button.today, value: Today, developmentLocale: en
You can also use this swift wrapper which replicates the ObjC macros.
public func OSLocalizedString(key: String, comment: String)
Hi,
I'm testing your OTA plugin for the first time in an iOS app (in swift, with the correct bridgers) and I'm facing a problem.
I managed to use this plugin to connect to the API without trouble, but when I try to get a value, the app fallback to my local localizable.strings file.
The code I implemented in my appdelegate is :
Then, in my view controller, the line I'm trying is :
print(OneSkyOTAPlugin.localizedStringForKey("planning.button.today", value: "Ajd", table: ""))
Here is the output to the console :
Yet, the key is correctly implemented on the platform. So I don't understand this error message.
I even tried to replace my original .csv file by all my .strings files but it seems it's not enough to make it work !...
Can you please help me with that?