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.

Revisions

  1. chsh created this gist May 10, 2012.
    12 changes: 12 additions & 0 deletions appapp_delegate.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    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
    2 changes: 2 additions & 0 deletions resources-en.lproj-InfoPlist.strings
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    CFBundleName = "English Version";
    CFBundleDisplayName = "English";
    1 change: 1 addition & 0 deletions resources-en.lproj-Localizable.strings
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    "start" = "Please tap me!";
    2 changes: 2 additions & 0 deletions resources-ja.lproj-InfoPlist.strings
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    CFBundleName = "日本語バージョン";
    CFBundleDisplayName = "日本語";
    1 change: 1 addition & 0 deletions resources-ja.lproj-Localizable.strings
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    "start" = "タップしてね";