Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

There seem to be a good number of translation web services popping up that allow for crowdsourcing of applications and provide APIs to keep language files (primarily po and yaml) in sync.

For us JavaScript developers however, the market seems immature. I've looked at projects such as "Webtranslateit", "99translations" and "Transifex" but none provide a good example of integration with a JavaScript i18n library.

What I'm looking for is a good example of a Translation Dashboard (web service) that can export to a format (json) used by any JavaScript translation library.

Please suggest good starting points for any such (preferably tested) workflows!

share|improve this question

closed as not constructive by Alex, Eight Days of Malaise, Barry Nov 18 '11 at 23:01

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

add comment

1 Answer 1

If you've got any server-side components to your app, I'd highly recommend using the approach detailed in i18njs : Internationalize Your JavaScript With A Little Help From JSON And The Server.

That way, you could translate strings from both your server-side and client-side code in a single file with a single crowdsourcing application and then just use a snippet of server-side code to generate the JSON and cache it whenever the source file gets updated. (i18njs caches the JSON using localStorage if available, but you could always add a far-future Expires header and a timestamp query parameter to the request to prevent round-trips on pre-localStorage browsers too)

As a side-benefit, you'd work around the fact that Javascript doesn't really have a way to query the user's preferred language aside from directly asking them. (Server-side stuff has access to a header named Accept-Language which automatically exposes the browser's default language preference without any prompting... providing an excellent way to set your default language choice)

If, on the other hand, you're writing a purely client-side app, I'm not sure what to suggest... though you could always still use that "whip up a code snippet to translate from PO/YAML to JSON" approach. It's probably what I'd do in your situation. (You do already have a set of build scripts for stuff like bundling and minifying JS/CSS resources, right?)

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.