Localize.js is a great service. Gone are the days of having to internationalize your websites by hand.
That being said, existing UI has a pretty annoying in my opinion limitation – there is no way to add phrases manually. 99% of the time, Localize.js is able to automatically pick up all of the phrases on the page, but there is always that 1 percent.
Turns out there is a way to add phrases manually, though, using their API available via developer tools console.
To do so:
- Open developer tools, and in console type in
window.Localize.phrase("YOU PHRASE HERE")
- Check network tab for call to
https://global.localizecdn.com/api/lib/
and make sure you can see the the right phrase in your network request. - In Localize.js web UI check if the new phrase is seen under
Phrases -> Search -> Pending
- Approve the phrase there.
- Confirm that it now visible under
Phrases -> Search -> Published
- Confirm that is now translates properly on your site.
Here are a couple of screen shots of how it actually looks like.
Adding Phrase via console
Checking Network Tab
Hope this helps.