How to integrate Localize.js with subfolders or subdomains

Hey folks. I need to make a website multi-lingual, but not have a cap on the word count, like with Weglot. I found Localize.js which looks like a good fit, but I’m not sure how to integrate it in an SEO-friendly way, with folders or subdomains. I’m referring to this article from their Help Center. Has anyone done this before? I need separate links for each translation.

After a call with their Support, I understand this could work if we could the same page be part of multiple folders (/en/ and /fr/, for example). Is that possible somehow?

@Brandon? Can you help here? Any updates?

Hi @calin_balea! :wave: Tyler here from Localize. I spent some time familiarizing myself with your use case and reviewing the call you had with our support team to see how I could help.

Our subdirectories language detection works “out-of-the-box”. If you’re using subdirectories like “localizejs.com/fr”, and the language “fr” is active in your project, the page will get translated to that language when a user visits the page automatically. There’s no additional configuration needed on the Localize side to make this happen.

Your development team would need to set up your web server to point the target language subdirectories to your main website. This could be done using Javascript on the frontend, or some other method on the backend at the server level.

When using the subdirectories method there is only 1 website, with the translations being managed using the Localize dashboard. The appropriate translations are automatically displayed in the user’s browser, but they are all being served from the same website. The search engine sees this as different websites in different languages based on the unique URLs you’ve set up.

I’d be happy to help with any other questions. Feel free to email support@localizejs.com and I’ll pick up your ticket to assist.

Thanks for the reply.

Re: “Your development team would need to set up your web server to point the target language subdirectories to your main website. This could be done using Javascript on the frontend, or some other method on the backend at the server level.”… this is where I’m confused. With Webflow I don’t know if I can do any server level edit. All I can do is insert a script in the website head or footer.

Hi, I am considering adopting localizejs too.

A few questions here:

  1. Using localizejs on Webflow support sub-directory? I want to be sure about this.
  2. Can I change the language code as some codes are too long, eg. /zh_HK/ into just /hk/
  3. We have to complete all the translations on the dev URL before launching to www. (eg. uat.domain.com). Is it ok if we start our works on uat., and later, we simply have to change the URL to www?

Thanks and hope can have feedback soon!
@Tyler_Sassatelli
@Brandon
@Localize

Hi @anthonychan2509 :wave:

I took a quick review of my comment above and that all still holds true today. Our library is designed to work with these subdirectories or language subdomains out of the box. As I mentioned above, you would need to set up your webserver to point the target language subdirectories to your main website. If you’re unable to do this with Webflow directly we can offer a solution with our enterprise plans that solve for this need. Feel free to email support@localizejs.com with any questions there.

We do support a multi-site deployment as you described. You can detect content on a dev or staging site, translate it in Localize, and have translations automatically delivered once you’re in production.

Hope this helps! Please feel free to reach out to Localize Support with any other questions.