Skip to content

Instantly share code, notes, and snippets.

@chsh
Created May 10, 2012 08:41
Show Gist options
  • Save chsh/2651921 to your computer and use it in GitHub Desktop.
Save chsh/2651921 to your computer and use it in GitHub Desktop.
RubyMotion Localization sample.
class AppDelegate
def application(application, didFinishLaunchingWithOptions:launchOptions)
alert = UIAlertView.new
alert.message = t('start')
alert.show
true
end
def t(key)
NSBundle.mainBundle.localizedStringForKey(key, value:nil, table:nil)
end
end
CFBundleName = "English Version";
CFBundleDisplayName = "English";
CFBundleName = "日本語バージョン";
CFBundleDisplayName = "日本語";
"start" = "タップしてね";
@suupic
Copy link

suupic commented Mar 4, 2013

Is that '-' means folder '/' ?
resources/ja.lproj/Localizable.strings ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment