diff --git a/Example/Sample Project.xcodeproj/project.pbxproj b/Example/Sample Project.xcodeproj/project.pbxproj index 29c4fd3..d551644 100644 --- a/Example/Sample Project.xcodeproj/project.pbxproj +++ b/Example/Sample Project.xcodeproj/project.pbxproj @@ -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 */; }; @@ -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 = ""; }; + E0245EA61964F243008F163B /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/InfoPlist.strings; sourceTree = ""; }; + E0245EA71964F243008F163B /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; E0369CE6193822F10082ADB7 /* ABXFeedbackViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABXFeedbackViewController.h; sourceTree = ""; }; E0369CE7193822F10082ADB7 /* ABXFeedbackViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ABXFeedbackViewController.m; sourceTree = ""; }; E0369CE91938233F0082ADB7 /* ABXKeychain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABXKeychain.h; sourceTree = ""; }; @@ -204,6 +208,7 @@ E039FD91192C51FB00BA0B76 /* ABXViewController.h */, E039FD92192C51FB00BA0B76 /* ABXViewController.m */, E039FD94192C521B00BA0B76 /* Storyboard.storyboard */, + E0245EA51964F229008F163B /* Localizable.strings */, ); path = "Sample Project"; sourceTree = ""; @@ -378,6 +383,7 @@ hasScannedForEncodings = 0; knownRegions = ( en, + fr, ); mainGroup = E039FD3F192C290E00BA0B76; productRefGroup = E039FD49192C290E00BA0B76 /* Products */; @@ -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 */, @@ -469,10 +476,20 @@ /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ + E0245EA51964F229008F163B /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + E0245EA41964F229008F163B /* en */, + E0245EA71964F243008F163B /* fr */, + ); + name = Localizable.strings; + sourceTree = ""; + }; E039FD54192C290E00BA0B76 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( E039FD55192C290E00BA0B76 /* en */, + E0245EA61964F243008F163B /* fr */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/Example/Sample Project/en.lproj/Localizable.strings b/Example/Sample Project/en.lproj/Localizable.strings new file mode 100644 index 0000000..32ef653 --- /dev/null +++ b/Example/Sample Project/en.lproj/Localizable.strings @@ -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?"; \ No newline at end of file diff --git a/Example/Sample Project/fr.lproj/InfoPlist.strings b/Example/Sample Project/fr.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Example/Sample Project/fr.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Example/Sample Project/fr.lproj/Localizable.strings b/Example/Sample Project/fr.lproj/Localizable.strings new file mode 100644 index 0000000..ee17c41 --- /dev/null +++ b/Example/Sample Project/fr.lproj/Localizable.strings @@ -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?"; \ No newline at end of file diff --git a/README.md b/README.md index 8e30dac..e548c9d 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/appbotx.podspec b/appbotx.podspec index 7281e71..06119f4 100644 --- a/appbotx.podspec +++ b/appbotx.podspec @@ -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