Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

Monday, April 1, 2013

Internationalization with FuelPHP


FuelPHP is a free open-source PHP framework, based on PHP 5.3+. It implements a HMVC architecture (Hierarchical Model–View–Controller) where the controller plays a central part in the architecture, the view and the model being completely separated (hence they can't communicate which each other). It also offers many other features like a RESTful implementation, template parsing, an Object Relational Mapper, an authentication package and a caching system among other things. We will focus here on the way it handles internationalization in its version 1.5.1 from January 2013. The new 2.0 codebase development has already started but it should treat i18n the same way.

Sunday, February 3, 2013

Handling plurals with the Yii PHP framework


Yii (which stands for Yes, it is) is a free, open-source PHP framework started by Qiang Xue in 2008. Aimed at performance, based on MVC architecture, and following the event-driven programming paradigm, it also supports message translation, date and time formatting, number formatting, and interface localization. We will focus here on the way Yii handles the plural form format in its message translation feature in its current release (1.1.13).

Tuesday, January 15, 2013

CodeIgniter tutorial: how to extend a helper


CodeIgniter helpers are toolkits of functions created to ease your coder life. You can find them in the system/helpers/ directory. Among them, we get arrays, captchas, cookies, emails, and forms helpers to cite just a few.

The inflector helper (inflector_helper.php) defines the functions singular (which returns the singular form of the word given as parameter) and plural (which returns the plural form of the word given as parameter), but only for the English language. We will see in this tutorial how to add the support of another language (here, French) to the plural function, and thus enabling the pluralization of French.

Saturday, January 5, 2013

CodeIgniter: SEO-friendly localized URLs


After having seen how to internationalize CodeIgniter by using language files, we will see in this post how to create localized SEO-friendly URLs, i.e. understandable URLs for both search engines and users.

Saturday, December 29, 2012

CodeIgniter internationalization


CodeIgniter is an open-source PHP framework that follows the MVC architecture (Model–View–Controller). Its main advantage is being simpler and lighter (4Mb all wet) than Zend or Symfony, with a fast learning curve. We will detail in this post the internalization by language files in the version 2.1.3 of this framework.