Approaches to JSON internationalisation (i18n)

I needed to create an API that is capable of serving objects with strings in more than one language. Let me present the problem with an example. Lets assume that we have a web app or a mobile client that wants to get information about coffee shops around the city. Also, lets assume also that we are going to have to support two languages, English and Hebrew (I know, right ? »

i18n for Node + Express

In this post i’m going to demonstrate a simple way to add multi language support to a node + express project. Simple server Lets start with a simple server: We first require express, then we tell express where to look for our templates files. In this case I used ejs as the template engine. I like it because it’s syntax is basically html with special <% ... %> syntax for embedding code from the server. »