SLBundle 0.0.1

SLBundle 0.0.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Jan 2015

Maintained by hirohisa.



SLBundle 0.0.1

  • By
  • Hirohisa Kawasaki

SLBundle provides to specify a standard language for iOS.

First or second primary language is English in iOS's localization. If you change primary language, SLBundle can do.

Installation

There are two ways to use this in your project:

  • Copy the ImageLoader class files into your project

  • Install with CocoaPods to write Podfile

platform :ios
pod 'SLBundle', '~> 0.0.1'

Usage

Select standard language

[SLBundle mainBundle].standardLanguageCode = @"ja";

Excluding languages

[SLBundle mainBundle].exclusionLanguageCodes = @[@"en"];

localize

NSString *string = SLLocalizedString(@"key");

or

NSString *string = [[SLBundle mainBundle] localizedStringForKey:@"key" value:@"" table:@"Example"];

Example

If you are Japanese, you want to develop in Japanese but your product is not support in Japanese.

#ifdef DEBUG
    [SLBundle mainBundle].standardLanguageCode = @"ja";
#else
    [SLBundle mainBundle].exclusionLanguageCodes = @[@"ja"];
#endif