localizable.strings

IOS/iPhone: Nested Localizable.strings Files?

核能气质少年 提交于 2021-02-07 13:19:37
问题 I'm creating an app that will have a number of variants. These variants will be controlled by a few strings in multiple Localizable.strings files. However, 90% of the strings will remain the same. I'd like to have it so that each of the unique Localizable.strings files imports the "master" one, so that I don't have to go through each of the app variant files when I want to change a common string. Is this possible? 回答1: Two alternatives: Use custom wrapper functions around NSLocalizedString

Localizable.strings - The data couldn’t be read because it isn’t in the correct format

大憨熊 提交于 2020-06-09 07:36:30
问题 If I copy something from textedit or web and paste it to localizable file it shows this compilation error. If I type those in localizable file it does not show any error. I am assuring you that I using the correct format and ';' in the file. "New" = "New"; "In Progress" = "In Progress"; "Waiting" = "Waiting"; "Closed" = "Closed"; 回答1: Use plutil from the Terminal: you have to run it for each version of the localizable file. E.g cd into your project root cd eb.lproj - you can replace this with

Send localized string key in loc-args for iOS Push notifications

拥有回忆 提交于 2020-05-27 04:06:29
问题 My application supports 4 languages & push notifications. When I send push notification to APNS , I am sending loc_key & loc-args . Now I need to send localized strings in loc-args array so that I can translate those on iOS app side when app receives the push notification. But when I send localized strings in loc-args , instead of showing translated string in notification center , it just showed localized key as it is. My string file contains below 2 messages: "WINNER_ALERT"= "Congratulations

iOS - Emphasise with bold strings in Localizable.strings

白昼怎懂夜的黑 提交于 2020-01-30 06:25:54
问题 Is there a way bold some words inside the Localizable file like so? "Pending network connection" = "<b>Pending</b> network connection"; I have this string inside and i want to emphasis only certen words: "camSave" = "To complete onboarding:\n1. Tap Save and disconnect to disconnect from the camera.\n2. Connect to the internet.\n3. Log in to Cloud."; Btw i want to use it inside alert 回答1: You can actually use HTML tags with NSAttributedString . This is what I used: static func

Swift: Localization in Storyboard - Labels not added to Main.strings?

≯℡__Kan透↙ 提交于 2020-01-24 02:19:06
问题 When I try to localize my app and I create a new Main.strings file for the target language, everything I have created in interface builder (labels, buttons, ...) is added to the new Main.strings files (base and language versions) and I can localize the text accordingly. But when I later add a label or a button to a ViewController in interface builder, it is not automatically added to the Main.strings files for the base and language version. So, how can I find out what the ObjectID for the

How can I get my Layout file to show its label as others do?

大兔子大兔子 提交于 2019-12-25 02:53:11
问题 In most cases, adding an Activity creates a corresponding Layout (xml) file that shows "[ActivityName]" in the Action Bar (I don't know if that's the correct terminology) of the Layout. However, in one case, that is not so. With AndroidManifest.xml like this: <activity android:name="hhs.app.VerifyCodeActivity" android:label="@string/title_activity_verify_code" > </activity> <activity android:name="hhs.app.DeliveryItemActivity" android:label="@string/title_activity_delivery_item" > </activity>

Localizing strings in strings.xml gives NullPointerException

↘锁芯ラ 提交于 2019-12-25 01:55:56
问题 My work computer that Eclipse is installed on does not have internet connectivity due to work related issues so all code and LogCat text has been hand typed instead of copy and pasted since I am on a separate laptop that Eclipse is installed right now. So bear with me for any typos. Now to the issue. In the new version of my app, I am making it Spanish supported. I localized all my strings in strings.xml . Below is my Java code that I am not usuing to implement. public class SplashScreen

Localized file paths hard coded in XCode 4 - disappear when project moved to new folder

ぃ、小莉子 提交于 2019-12-23 23:22:22
问题 We localized a project recently into to 15 languages using Xcode but I noticed when I took the project home the paths to some of the localized files were all hardcoded to the full path of my work mac. We only localized two files: InfoPlist.strings Localizable.strings We used Xcode to do the localisation as follows. We added the 15 languages to the whole project. Then clicked on Localizable.string and in File Inspector > Localisation > + clicking + we added it to the 15 languages we set up for