Is it possible to have 2 different application icons depending on the language? [duplicate] - iphone

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Localization of icon and default screen in iPhone
As my question already says, I want to have 2 different application icons.
If for example english is the native language on the device I want it not only to have a different app name but also a different icon.
So is that actually possible?

According to apple documentation, you can do it.
An iOS application should be internationalized and have a
language.lproj folder for each language it supports. In addition to
providing localized versions of your application’s custom resources,
you can also localize your application icons and launch images by
placing files with the same name in your language-specific project
directories. Even if you provide localized versions, however, you
should always include a default version of these files at the
top-level of your application bundle. The default version is used in
situations where a specific localization is not available. For more
information about localized resources, see “Localized Resources in
Bundles.”
This info was extracted from here:
https://developer.apple.com/library/mac/#documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html

You can do it, if you want too... just click on your icon file (consider Icon.png) now simply click on the ‘+’ in that ‘Localization’ pane on the right.
Add languanges that you want to provide support. Consider you have English And Spanish language support, add those two languages. It will create ‘en.lproj’ and ‘es.lproj’.
Now just see those directory, you can see both directories have their own copy of Icon.png. So just replace that image and make sure new file has same name as the replaced one.
Now Run it. And check by changing language in Setting>International>Language
Basic thing is based on language it will check if localization is available for that particular resource, if it exists it will be used.

No, you can't have localized app icons
Sorry, I was very wrong, it is possible. I was quite sure but my information obviously was very outdated :).

Related

What Files can iOS Apps use?

The situation: We would like to make an app that shows all files on an iOS Device
The system: iOS App, non jailbroken system
The question:
What files (and filetypes) are allowed to be accessed by every app (system-wide) ?
(PS: we won't do file-browser like actions like sub-folders, delete, etc .. )
UPDATE :
what you are trying to achieve is not possible because of the sandbox feature of the apps. though you can display certain file types using below description.
Previously Answered this
If I understand your question correctly, there is already a framework for what you are trying to achieve. It is called the quick look framework and supports these many file types...
A Quick Look preview controller can display previews for the following items:
iWork documents
Microsoft Office documents (Office ‘97 and newer)
Rich Text Format (RTF) documents
PDF files
Images
Text files whose uniform type identifier (UTI) conforms to the public.text type (see Uniform Type Identifiers Reference)
Comma-separated value (csv) files
you can have more info about it here...
You can't access anything other than your application folder. Your application is sandboxed and for good reasons (privacy, malware, etc...)
You can only access files within your application directory. Look here for a full explanation
If you don't mean files and just the content of the phone, there are APIs for
Photos
Contacts
Media from the Music app

where in an XCode project does it set "InfoPlist.strings" as the filename to use for locationalization?

where in an XCode project does it set "InfoPlist.strings" as the filename to use for locationalization?
Just trying to understand how XCode pulls things together here. For example to set the app name specifically I can change this in "AppName_plist-Info.plist", however if I go localization it seems it then has to be set via the "InfoPlist.strings" files.
I can see in XCode where it specifies the "AppName_plist-Info.plist" file name, in the Target/BuildSettings/Packaging information area, but I don't see mention of "InfoPlist.strings", so how does Xcode/IOS know to override what is in "AppName_plist-Info.plist" based on what's in "InfoPlist.strings"?
Xcode doesn't really override the name, it creates localizations in your apps bundle. iOS will look for the name of the app in de localization folder to which the language of the system is set.
These files have pre-determent names, thus you can not set them.
All the localized files will be for example in bundle.app\en.lproj for english or bundle.app\nl.lprojfor dutch.

about iOS localization

In the following doc:
http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPInternational/Articles/LanguageDesignations.html
it's mentioned that
In iOS, the bundle interfaces do not take dialect or script information
into account when looking for
localized resources; only the language
designator code is considered.
Therefore if your project includes
language-specific project directories
with both a language and region
designator, those directories are
ignored. The bundle interfaces in Mac
OS X do support region designators in
language-specific project
directories.
I don't quite understand this. Does it mean that the name of .lproj directory cannot contain any region code?
But at least I know that iOS accepts zh_TW.lproj, zh_CN.lproj. How about en_GB.lproj and en-GB_GB.lproj? Or it only knows en.lproj?
This simply means that iOS would support only two digit language codes (e.g. en.lproj, es.lproj etc.). Whereas Mac OS X will support the format Language_Region (e.g. en_GB, en_US etc.).
I think that information is outdated. They must not have updated the Mac development docs when the iOS changes were made.
When you're creating your Localizable.strings or Project.plist file, you will create one per language or language-dialect. Just create the ones you need.
If you're using Xcode 4, be sure to show the "Utilities" (View-->Utilities-->Show Utilities) when the Localizable.strings or Project.plist file is selected. It will have a Localization section that makes adding these easy.
UPDATE: As of iOS 8 you can now use any language or region in iOS.
Apophenia is correct. Although iOS has 30 languages that it will recognize as .lproj folders, it won't accept any regional codes, so telling it fr-CA won't get you French Canadian, but rather will simply use your French or English strings. The only exception to this rule is Chinese, which should be zh-Hans for Simplified Chinese and zh-Hant for Traditional Chinese.
You should always use the two-letter code for the language (en.lproj, fr.lproj, es.lproj, de.lproj, and so on).
There is a complete (and updated) list of the current supported languages and language codes for both iOS and iTunes here:
http://www.ibabbleon.com/iOS-Language-Codes-ISO-639.html
Note that the iTunes App Store has a different list of supported languages, which makes the chart linked to above very handy!

iPhone support Multiple Languages

In my project, I need to support the Korean language. How is it possible - can anyone explain briefly with example, whether it is possible or not?
It's certainly possible.
You just tell Xcode to add a Korean localization to any of your application's localizable resources that need to change for that language. (Localizable resources include strings files, xib files, and potentially any images containing text.) Xcode will create a copy of your existing English resource, which you can modify and replace with a Korean-language equivalent.
Then when your application is run on a device with Korean set as its preferred language, iOS will automatically use the Korean resources intead of the English ones to present the application's user interface. If you have used good localization code practices (such as using NSLocalizedString to reference strings you present in the user interface) you shouldn't have to change any of your code to support different languages.
Check this guide on how to localize your apps for iPhone: http://www.icanlocalize.com/site/tutorials/iphone-applications-localization-guide/

iphone localization: retrieving a different file

i have an app that i have to localize. I am already localizing the nibs and some texts, i just have a doubt.
I need to pull a plist from the bundle which contains some texts, for the other languages i would have other plists. How can i accomplish the loading of them in a nice simple way.
My initial though is to have a text.plist , text-sp.plist , text-fr.plist and retrieving the current language then if language == english grab the text.plist, if language == spanish grab text-sp.plist and so on.
Is there a better way to do this?
I'd rather somehow make the .plist localizable and do something similar to what i do with texts using NSLocalizedString, but i am not sure how to use it in this case.
Sorry, just found the solution.
Just right click the .plist file and add new localizations like any other file. Then the OS handles which one to load according to the current locale settings.
I had to clean my targets in order for the changes to take effect, thats why i initially thought this was not working.