Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 12-03-2008, 01:18 AM   #1 (permalink)
RickMaddy
Registered Member
 
RickMaddy's Avatar
 
Join Date: Oct 2008
Location: Denver, CO
Posts: 2,122
Default Letter Index like in Contacts

Seeking i18n experts - and if you don't know what 'i18n' is then you aren't one

The Contacts app shows the letters A-Z on the list of contacts whether the contact list uses all of those letters or not. For fun I switched my iPhone's language to Russian and the letters on the contact list changed to an abbreviated list of the Cyrillic and Latin letters. It was abbreviated since the combined length of the two alphabets is too long to fit. Again it showed letters I didn't have corresponding contacts for.

OK, with that background, here's my question. For a given device's language setting / locale, how do I create the appropriate list of letters as shown in the Contacts app?

I've looked at all the NSString methods, NSCharacterSet, NSLocale and none seem to provide this list. There is a way to get something called an 'exemplar' character set from a locale but there is no way to extract the characters from a character set.

Any ideas?

So far I've taken the simple way out of just grabbing the first letter of all the entries in my table but that leaves out the letters that have no corresponding entry. And I don't want to hard code A-Z because then the app sucks for non-Latin alphabetic users.

P.S. Returning my phone back to English was a challenge since I had to pick the right Settings app menus with nothing but Cyrillic looking back at me
RickMaddy is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,676
Threads: 89,155
Posts: 380,389
Top Poster: BrianSlick (7,110)
Welcome to our newest member, tammyobrien
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:07 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.