Live data from Hacker News

FormatJS – Internationalize your web apps on the client and server

formatjs.io

1–10 of 39 posts

Re: FormatJS – Internationalize your web apps on the client and server

#2
Shameless plug: I've been working on a similar project for about a year now called Localize.js (https://localizejs.com), with the goal of automating the entire process of internationalization / localization. It works by scanning the DOM for translatable content, and injecting translations on-the-fly after the page loads (this happens so quickly that the user never sees the text in the original language).

Re: FormatJS – Internationalize your web apps on the client and server

#6
post #2

Shameless plug: I've been working on a similar project for about a year now called Localize.js ( https://localizejs.com ), with the goal of automating the entire process of internationalization / localization. It works by scanning the DOM for translatable content, and injecting translations on-the-fly after the page loads (this happens so quickly that the user never sees the text in the original language).

>It works by scanning the DOM for translatable content, and injecting translations on-the-fly after the page loads

I don't like this approach because it makes the framework/library harder to integrate with other DOM-modifying frameworks like data binding frameworks that are very popular these days. A more modular approach in my opinion would be to simply provide a function/functions to do the localization conversions. That can easily be integrated to any data binding framework.

>(this happens so quickly that the user never sees the text in the original language)

And if you use it with something like AngularJS, the end result is visual flicker after DOM changes..

Re: FormatJS – Internationalize your web apps on the client and server

#8

Looks great. One thing that wasn't clear, can you provide your own translations or is it all machine translation?

Hi! There are helpers for dealing with dynamic content like numbers and dates, but also there's message formatting for when you have your own translations like "I have {numCats, number} cats.". Here's the explanation for the Handlebars integration: http://formatjs.io/guide/#messageformat-syntax.

Re: FormatJS – Internationalize your web apps on the client and server

#9
post #4

I'm currently using Moment.js, i18next and Numeral.js with AngularJS. I wonder how FormatJS compares with this. At least one benefit FormatJS could have is having a unified collection of translation files.

the main benefit of formatjs is that it offers a declarative syntax at the template level, which simplifies things drastically. we don't have an integration for AngularJS or Ember just yet, but we are planning to do so very soon.

Re: FormatJS – Internationalize your web apps on the client and server

#10
post #6
post #2

Shameless plug: I've been working on a similar project for about a year now called Localize.js ( https://localizejs.com ), with the goal of automating the entire process of internationalization / localization. It works by scanning the DOM for translatable content, and injecting translations on-the-fly after the page loads (this happens so quickly that the user never sees the text in the original language).

>It works by scanning the DOM for translatable content, and injecting translations on-the-fly after the page loads I don't like this approach because it makes the framework/library harder to integrate with other DOM-modifying frameworks like data binding frameworks that are very popular these days. A more modular approach in my opinion would be to simply provide a function/functions to do the localization conversions…

Localize.js is fully compatible with all DOM-modifying frameworks (Backbone, Angular, etc). Localize.js doesn't actually replace existing DOM elements, rather it simply changes the existing elements' contents as to not interfere with bindings.

We've also spent a ton of time making sure there's zero visual flicker as the DOM changes take place. We have a bunch of companies using it to translate Angular and Backbone apps (for example, http://venzee.com/ and https://www.verbling.com).

Post reply on HN