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.