Thursday 24 March 2016

Learning Handling Copy from ResearchKit

As previous post, I did concern how to manage copy inside the app. So I did download ResearchKit and learn something about managing copy or string that display in your app.

Here is how they code a string

`ORKLocalizedString(@"CONSENT_NAME_TITLE", nil)`

The ORKLocalizedString is defined as follows.

#define ORKDefaultLocalizedValue(key) \
[ORKDefaultLocaleBundle() localizedStringForKey:key value:@"" table:@"ResearchKit"]

#define ORKLocalizedString(key, comment) \

[ORKBundle() localizedStringForKey:(key) value:ORKDefaultLocalizedValue(key) table:@"ResearchKit"]

And of course they translate the copy for these languages.


This are the most professional code for doing translation and copy.

Separating User-facing Text from your code
https://developer.apple.com/library/ios/documentation/MacOSX/Conceptual/BPInternational/InternationalizingYourCode/InternationalizingYourCode.html

No comments:

Post a Comment