[ANN] Localization landed in the master

20 views
Skip to first unread message

Dogild

unread,
Oct 2, 2015, 2:40:03 PM10/2/15
to Cappuccino & Objective-J
Hi guys,

The localization feature has been merged in the master ! It works almost like Cocoa except few things.

We have added the following features to the framework :

- Added the protocol CPBundleDelegate
- Added the methods  CPLocalizedString(key, comment), CPLocalizedStringFromTable(key, table, comment) and CPCopyLocalizedStringFromTableInBundle(key, table, bundle, comment)
- Added the method localizableStringForKey:value:table: in CPBundle
- Added the base localization and interface builder localization for a xib (you can only use once at a time). Base localization -> one xib and .strings file for each language you want to use. Interface builder localization -> one xib for every languages
- Added the methods pathForResource:ofType, pathForResource:ofType:inDirectory and pathForResource:ofType:inDirectory:forLocalization in CPBundle
- New key word are available for the Info.plist (this is where we are different with cocoa). CPBundleLocalizableStrings (an array of .strings file to load), CPBundleTypeOfLocalization (CPBundleInterfaceBuilderLocalizationType or CPBundleBaseLocalizationType) and CPBundleDefaultLanguage (CPBundleDefaultBrowserLanguage or the language you want (en, fr, de etc etc...))

There is a test app in in the folder Tests/Manual/CPLocalizationTest

More informations and sources here : https://github.com/cappuccino/cappuccino/pull/2343

If you need any help, feel free to ask or to come on gitter

Thanks,
Alexandre Wilhelm
Reply all
Reply to author
Forward
0 new messages