3 ms·
http://i.imgur.com/KpULrEs.png http://i.imgur.com/KpULrEs.png Localize.js, a javascript library for translating websites. It detects and translates text on you
by cj 13y ago
http://i.imgur.com/KpULrEs.png http://i.imgur.com/KpULrEs.png
Localize.js, a javascript library for translating websites. It detects and translates text on your website, and provides a UI for ordering and managing translations.
Docs: https://localizejs.com/docs/usage/installation https://localizejs.com/docs/usage/installation
- andrewlouis93 13y agoThis is sick. I haven't looked into other website localizing solutions, but how is this approach better than what's currently being used in industry?
- cj 13y agoThe traditional localization approach is very time intensive, and requires a large time commitment to implement properly. Localize.js automates most of the localization process, which lets you localize your site in ~10% of the time it would normally take. The traditional way you'd localize a website is by replacing text in your template files with string keys. For example: <h1>Hello world!</h1> . becomes... <h1>{{ t 'homepage.hello_world' }}</h1> You'd then maintain dictionary files that maps "homepage.hello_world" to "Hello world!", with a separate dictionary for each language. Additional complications arise when you want to pluralize phrases, since different languages pluralize phrases differently, etc. It's a pain to setup an effective localization workflow using the traditional approach. Localize.js handles all of this automatically, and removes the need to convert your template files or manage your own phrases and translations. If you're interested in trying it out, I'd love to get in touch :) bp@brandonpaton.com
- gbog 13y agoCan't check your site because I'm on a phone. I would interested to know how you solve this issue.
- tluyben2 13y agoVery nice work. Definitely something we'll be using.
- arthurk 13y agothis looks very nice! is it possible to translate messages that only show in specific use-cases (for example error messages)?
- cj 13y agoYes! Localize.js watches the page for changes, and immediately translates text that is added to the page (like an error message). You can also translate text manually, like this: Localize.translate('Hello!');