Community Forum

Ask a Question
ANSWERED

Getting a wordcount

Is it possible to get a word count for my project? How can I track my project based on the number of words translated?
ANSWERED

Closing or hiding the widget

I see that the Localize object has a .destroy() function but this does not remove the widget from the DOM. Other than directly finding the element via id and calling remove on it... document.getElementById("localize-widget").remove(); Is there any other way to hide your widget programmatically?
ANSWERED

NextJS 13 app directory localisation approach fails to load resources from local resources like images for next/image

Hey everyone, I was happy to read your blog post on an how to achieve localisation in the new NextJS 13 app directory (https://locize.com/blog/next-13-app-dir-i18n/). Unfortunately with my setup I cannot load local resources from the public folder. For example requests for image resources get denied with a 400 error. ``` ImageError: Unable to optimize image and unable to fallback to upstream image at imageOptimizer (/usr/src/app/node_modules/next/dist/server/image-optimizer.js:563:19) at async cacheEntry.imageResponseCache.get.incrementalCache (/usr/src/app/node_modules/next/dist/server/next-server.js:238:72) at async /usr/src/app/node_modules/next/dist/server/response-cache/index.js:83:36 { statusCode: 400 } ``` I guess it has something todo with the middleware not redirecting properly for static resources. I am using NextJS 13.1. Did I forget a crucial step? I would be gratefull for hints and tips onto how to fix the issue. Cheers Luke
ANSWERED

Marry localize.js with pre-path-domain structure (/en/) and limit where to look for phrases?

Hello! I am on a wordpress setup with localize.js up and running. I plan on mixing hardcoded translations with localize.js automated translations and get rid of the javascript-language-switcher. Therefore I need to know: 1a) A way to manage a domain structure like this in wordpress: `http://domain.com/uebersetzter-beitrag-slug` (default is German without a pre-path) `http://domain.com/en/translated-post-slug` 1b) A way to translate slugs in wordpress My domain structure looks like this `http://domain.com/<category> archive.php` for categories `http://domain.com/<category>/<subcategory> archive.php` also filtering subcategories `http://domain.com/<post-title-slug> single.php` for posts `http://domain.com/kontakt page.php` for pages `http://domain.com/?s=search-term` 2) How to let localizejs only run when /en/ is set 3a) How to limit where localizejs looks for phrases. 3b) .. and translate <title> and <meta>-tags 4) "autopublish" (and therefore translate) these phrases with machine translating, but still be able to do human translation in the dashboard (or order a translation) The idea with 3) and 4) is that the editor generally doesn't have to use the localize dashboard, only when needed– ––––––– My plan on solivng these issues: 1a) Use qTranslate X plugin and tell the editors to use it just for the taxonomies etc. and ignore post title and post content 1b) Use qTranslate X slug-translation; but .. I read about several issues with this Open for suggestions on 1) 2) With php echo the Localize.initialize({ ... }) script-part only when /en/ is in the url. But I somewhat fear this interferes with how localizejs does things. Defenitely need your thoughts on this one. 3) Let localize js only look in containers with the class .localizejs <div class="content localizejs">...</div> Didn't found a way to do this in frontend API, though 4) No idea, please help :) I wonder if localize is the right tool for this approach and would love to hear your opinions on this, plus suggestions on how to solve these issues. Thank you!
ANSWERED

Applying SRI hashing to code snippet

I'm looking to apply SRI hashing to the code snippet provided by Localize to our site's header such as this: <script src="https://global.localizecdn.com/localize.js" integrity="sha384-<inserted hash value here" crossorigin="anonymous"></script> <script>!function(a){if(!a.Localize){a.Localize={};for(var e=["translate","untranslate","phrase","initialize","translatePage","setLanguage","getLanguage","detectLanguage","getAvailableLanguages","untranslatePage","bootstrap","prefetch","on","off"],t=0;t<e.length;t++)a.Localize[e[t]]=function(){}}}(window);</script> <script> Localize.initialize({ key: 'B4zTsWcVRDLMr', rememberLanguage: true }); </script> However, upon generating a hash I get this message: "Error: this resource is not eligible for integrity checks. See https://enable-cors.org/server.html" I was hoping to do this for security reasons. Is there any way to achieve this?
ANSWERED

Invoice for September

Can I please get our invoice for September? Charged for $249.00. Thanks!
ANSWERED

White-labeled widget

Hello, could you please explain me the difference between the Starter and the Growth package. In detail I would like to know what White-labeled widget and Advanced Workflow means. Kind regards, Daniel
ANSWERED

Support for rich text?

Does localize.js have a mechanism for handling rich text? For example, a paragraph of text may have a few words in the middle of a sentence bolded, or in a different colour. I want to keep the paragraph together as a single Phrase to keep translation simple. Thanks
ANSWERED

Pending Phrases to Trash

When i send a pending phrase to trash... do these phrases re-populate under pending after a page refresh? I didnt want to delete them and then not be able to retrieve them later.
ANSWERED

Updating the locale url on switch

I've tried a few things. I'm trying to get the url to enter the correct language locale when it switches. The URLs are set up and they work but when I change the language, the doesn't update the URL for that locale. For example, when I have `https://www.example.com/de` and I switch to Chinese, the language is correct but the url still show /de. Any ideas?