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, March 17, 2013

What are the hardest languages to learn for an English-speaking student?


This infographic compares the learning difficulty of many languages depending on the minimal time to achieve language proficiency for native English speakers. If languages like Spanish, French or Dutch should need about 600 hours to reach that level, Hindi, Russian, Thai or Greek would need about the double time to get there, and Arabic, Chinese, Korean and Japanese would double agin this time with 2,200 hours of class hours.

Sunday, February 17, 2013

Scarcity by design, not by definition


As we have seen in the previous post of this series, there has never been a real scarcity of domain name extensions, but a carefully planned creation of new ones to feed the market throughout the years, with the exception of the country code TLDs and their international character set support. Beside the mere cost of a domain name, whether it is a regular one, an internationalized domain, or one of the nearly 2,000 soon-to-be launched over-priced extensions, there are still hidden costs to be aware of, most of them being external ones.

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).

Saturday, January 26, 2013

Quite singular plurals


In most languages, the singular is the unmarked form of a word, and the plural is obtained by inflecting the singular. For instance, to the singular form cat of the English language matches the plural form cats. English counts two grammatical numbers: singular and plural. Other languages have different forms of grammatical numbers depending on the number of items.

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.