Parsing CLDR plural rules in javascript

English and many other languages have only 2 plural forms. Singular if the count is one and anything else is plural including zero. But for some other languages, the plural forms are more than 2. Arabic, for example has 6 plural forms, sometimes referred as ‘zero’, ‘one’, ‘two’, ‘few’, ‘many’, ‘other’ forms. Integers 11-26, 111, 1011 are of ‘many’ form, while 3,4,..10 are ‘few’ form. While preparing the interface messages for application user interfaces, grammatically correct sentences are must. [Read More]

Configurable node logger with winston

For an advanced logging system for nodejs applications, winston is very helpful. Winston is a multi-transport async logging library for node.js. Similar to famous logging systems like log4j, we can configure the log levels and winston allows to define multiple logging targets like file, console, database etc. I wanted to configure logging as per usual nodejs production vs development environment. Of course with development mode, I am more interested in debug level logging and at production environment I am more interested in higher level logs. [Read More]

Brackets, my favorite javascript IDE

I use Brackets for web development. I had tried several other IDEs but Brackets is my current favorite IDE. A few things I liked is listed below  It is free software licensed under the MIT License  written in HTML, CSS and JavaScript Availability of large number of extensions Some extensions I use with Brackets are: Markdown Preview for easy editing of markdown Brackets Git for git integration Themes for Brackets For Monokai Darksoda theme I use Brackets Linux UI Interactive Linter realtime JSHint/JSLint/CoffeeLint reports into brackets as you work on your code WD Minimap for SublimeText like code overview Beautify for automatic code formatting as you save using jsbeautify Beautify extension helps me a lot because most of the MediaWiki related code I write needs be as MediaWiki javascript coding convention. [Read More]

Hyphenation of Indian Languages in Webpages

In my last blogpost I explained hyphenation of Indian language text in openoffice. In this blogpost I will explain how hyphenation can be done in webpages. As I explained importance of hyphenation come into picture when we justify the text. The length of the lines are controlled by the parent tags…. Unicode had defined a special character called soft hyphen for hyphenation denoted by ­ . In HTML, the plain hy­phen is rep­re­sent­ed by the “-” char­ac­ter (- or-). [Read More]