Japanese Mobile Support for Cake PHP
CakePHP is a development framework for PHP that borrows many ideas from Ruby on Rails. I first heard about it when reading through the Merb camp keynote, which states Ruby On Rails is more then 10 times faster then CakePHP (and Merb is even faster). At mobalean, we prefer using Ruby, but if you happen to be using PHP, check out Ktai Library for CakePHP1.2.
The features of this library include:
- Handset detection by user agent (docomo, SoftBank, KDDI, emobile, iPhone)
- Carrier detection by email
- Cross carrier emoji lookup
- Entire page emoji conversion
- accesskey attribute for links
- Display emoji on PC
I had a quick look through the code, and unfortunately while CakePHP is Object Oriented, this code is not. This code, like much of the code for Japanese mobiles make extensive use of a "carrier code" variable. If the library used carrier objects instead, it would be much cleaner. Additionally, there is a lot of duplicated boilerplate code in the KtaiHelper and KtaiComponent class that code be removed in Ruby through the use of the Forwardable module. Nevertheless, if you are using PHP, you might be able to find something that helps you.
(Hat tip: matsuiさん)
