Skip to content

Commit

Permalink
Localize strings example
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartkhall committed Jul 3, 2014
1 parent 790470f commit 1f08699
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 1 deletion.
17 changes: 17 additions & 0 deletions Example/Sample Project.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
E0245EA31964F229008F163B /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = E0245EA51964F229008F163B /* Localizable.strings */; };
E0369CE8193822F10082ADB7 /* ABXFeedbackViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E0369CE7193822F10082ADB7 /* ABXFeedbackViewController.m */; };
E0369CEB1938233F0082ADB7 /* ABXKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = E0369CEA1938233F0082ADB7 /* ABXKeychain.m */; };
E0369CEE193825210082ADB7 /* ABXTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = E0369CED193825210082ADB7 /* ABXTextView.m */; };
Expand Down Expand Up @@ -62,6 +63,9 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
E0245EA41964F229008F163B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
E0245EA61964F243008F163B /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/InfoPlist.strings; sourceTree = "<group>"; };
E0245EA71964F243008F163B /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = "<group>"; };
E0369CE6193822F10082ADB7 /* ABXFeedbackViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABXFeedbackViewController.h; sourceTree = "<group>"; };
E0369CE7193822F10082ADB7 /* ABXFeedbackViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ABXFeedbackViewController.m; sourceTree = "<group>"; };
E0369CE91938233F0082ADB7 /* ABXKeychain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABXKeychain.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -204,6 +208,7 @@
E039FD91192C51FB00BA0B76 /* ABXViewController.h */,
E039FD92192C51FB00BA0B76 /* ABXViewController.m */,
E039FD94192C521B00BA0B76 /* Storyboard.storyboard */,
E0245EA51964F229008F163B /* Localizable.strings */,
);
path = "Sample Project";
sourceTree = "<group>";
Expand Down Expand Up @@ -378,6 +383,7 @@
hasScannedForEncodings = 0;
knownRegions = (
en,
fr,
);
mainGroup = E039FD3F192C290E00BA0B76;
productRefGroup = E039FD49192C290E00BA0B76 /* Products */;
Expand All @@ -395,6 +401,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E0245EA31964F229008F163B /* Localizable.strings in Resources */,
E0B026A3195BAE430065C07B /* AppbotX.bundle in Resources */,
E039FD56192C290E00BA0B76 /* InfoPlist.strings in Resources */,
E039FD5E192C290E00BA0B76 /* Images.xcassets in Resources */,
Expand Down Expand Up @@ -469,10 +476,20 @@
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
E0245EA51964F229008F163B /* Localizable.strings */ = {
isa = PBXVariantGroup;
children = (
E0245EA41964F229008F163B /* en */,
E0245EA71964F243008F163B /* fr */,
);
name = Localizable.strings;
sourceTree = "<group>";
};
E039FD54192C290E00BA0B76 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
E039FD55192C290E00BA0B76 /* en */,
E0245EA61964F243008F163B /* fr */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
Expand Down
9 changes: 9 additions & 0 deletions Example/Sample Project/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
Localizable.strings
Sample Project

Created by Stuart Hall on 3/07/2014.
Copyright (c) 2014 Appbot. All rights reserved.
*/

"How can we help?" = "How can we help you with Sample App?";
2 changes: 2 additions & 0 deletions Example/Sample Project/fr.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

9 changes: 9 additions & 0 deletions Example/Sample Project/fr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
Localizable.strings
Sample Project

Created by Stuart Hall on 3/07/2014.
Copyright (c) 2014 Appbot. All rights reserved.
*/

"How can we help?" = "Comment pouvons-nous vous aider Sample App?";
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,17 @@ Documentation coming soon, check the example.
### Notifications

Documentation coming soon, check the example.

## Localizing Strings

You can change any of the default strings by using localization. All strings used can be found in AppbotX.bundle, but it will prefer strings declared in your local strings bundle.

e.g.

"How can we help?" = "How can we help you with Sample App?";

See the sample app for an example.

## Communication

* If you found a bug, [open an issue](https://github.com/appbotx/appbotx/issues).
Expand Down
2 changes: 1 addition & 1 deletion appbotx.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
Pod::Spec.new do |s|
s.name = "AppbotX"
s.version = "0.5.4"
s.version = "0.5.5"
s.summary = "AppbotX is an Obj-C lib for the Appbot server."
s.description = <<-DESC
DESC
Expand Down

0 comments on commit 1f08699

Please sign in to comment.