Tags
Recent Comments
Elsewhere
Bookmarked 9 links
Free DNS service - Easy, web-based domain manager - ZoneEdit.com
Zerigo Managed DNS Hosting with an API | Zerigo
EditDNS - US and Europe DNS Hosting
FreeDNS - Free DNS - Dynamic DNS - Static DNS subdomain and domain hosting
Spicers Clovelly Estate | Spicers Clovelly Estate
Bookmarked 9 links
Dessine moi un objet » Blog Archive » Iphone and Itouch paper stand / dock
Waveboard – Google Wave Client for iPhone and Mac
Livestream - Broadcast LIVE streaming video
The LinkedIn Blog » Blog Archive LinkedIn: 50 million professionals worldwide «
Find the Best Twitter Apps for the iPhone, Blackberry, Web & More - oneforty
Updated status: On iPhone with IM+
Bookmarked 10 links
Home - Mixpanel | Real-time Web Analytics, Funnel Analysis
Social Media Monitoring Tools & Reputation Tracking | Trackur
Radian6 - Social Media Monitoring, Measurement and Engagement
Trendsmap - Real-time local Twitter trends
Tweetboard - True Twitter Conversation
Appointment Software Plus Contact Widget - Setster
Beautiful Soup: We called him Tortoise because he taught us.
Links
Extracting PO file with CakePHP I18n Shell
I have always been religiously wrapping
__()and__n()around my texts knowing that it needs to be localized some day. Then it got to me that I never knew how to actually localize it! Out of curiosity, I went ahead to extract the PO file using the I18n shell.What it does is basically look through your entire app folder for files and within each file extract all instances of
__()and gang, then grab the tokens necessarily for building the PO file. Now, this is where it gets picky.// error! invalid marker content! __('Delete post #' . $id); __n('comment', 'comments', $array[0]); __n('comment', 'comments', $object->noOfComments()); __n('comment', 'comments', (int) $noOfComments); // valid! it makes it easier to translate anyways sprintf(__('Delete post #%d', true), $id); // just $var will work, nothing funky sprintf(__n('%d comment', '%d comments', $noOfComments, true), $noOfComments);So if you are thinking of using the I18n shell, you should take note that the text to be translated should really be one single token. Also, the generated file has an extension of .pot but it should really be renamed to .po instead since Cake expects .po files in the locale folder.