Tech TLDR;

  • Archive
  • Top Posts
  • GitHub
  • LinkedIn
  • Contact

How to Manually Add Phrases to Localize.js

October 23, 2019 by admin

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:

  1. Open developer tools, and in console type in window.Localize.phrase("YOU PHRASE HERE")
  2. 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.
  3. In Localize.js web UI check if the new phrase is seen under Phrases -> Search -> Pending
  4. Approve the phrase there.
  5. Confirm that it now visible under Phrases -> Search -> Published
  6. 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.

Filed Under: Tools

Copyright © 2025 · eleven40 Pro Theme on Genesis Framework · WordPress · Log in