Cocoa : Objective-C, Cocoa and various other Mac related technical notes. Mainly notes for myself.
Updated: 4/4/03; 12:29:55 AM.

 

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.

 
 

Monday, December 9, 2002

I've been getting a lot of feedback from other budding Sherlock programmers on how to localize they're Channels.

So - being the lazy kind of guy I am - here's a quick HOWTO on how to localize your Sherlock Channel. Hopefully, the emails will stop. :-)

Presenting Vic's Nutshell guide on localizing Sherlock Channels:

1. Find your localized project files

You'll see locale specific files in your Sherlock project under the /Channel/.lproj directory.

So in my case for Canada411, I look for:

.../Canada411/Channel/en.lproj/

which is the directory for english localization files for my project.

The files which you're concerned with are your NIB files and your LocalizedResources.plist.

2. Externalize all your strings

You shouldn't be putting in locale specific strings into your code. Pull them all out and stick them into your LocalizedResources.plist file. You can use the PropertyList editor that ships with the Apple developer tools - you'll find it under /Developer/Applications/Property List Editor.

Or alternately - you can just click on a plist file and the editor will open automatically for you.

3. Copy your localized lproj directory and target a directory name with the new locale name.

Example: I copied .../Canada411/Channel/en.lproj to .../Canada411/Channel/fr.lpro

4. Change your NIB file in your new localization to reflect any language changes that must be made. Remember - if at all possible you should just pull out all locale specific strings into your plist file and set text values are channel startup time.

5. Pat yourself on the back. You're done.

That's all for now - have fun!
1:10:35 AM    


© Copyright 2003 Victor Ng.



Click here to visit the Radio UserLand website.

 


December 2002
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Nov   Jan