FYI, Full translation of Discourse including posts is possible

For anyone interested in multilingual Discourse sites, I wanted to share info about a product that I recently was able to integrate with my hosted site. I’m not associated with this company in any way other than as a customer and I get no compensation. I just am impressed with this tech and want to share it because translation is so hard and this makes it so easy!

The product is called Linguise. You can see how it gets set up to work with Discourse (or similar tech) in this video.

Basically, you create an account (free for 30 days) and it guides you through setting up some DNS CNAMEs for the main domain of your site that include a 2-letter language prefix. For example, fr.mysite.com, es.mysite.com–one for each language you want to make available.

They then give you a customized element that you need to include on the Discourse site. The easiest way to do this is to create a new theme component, then place their script command in the <Head> section.

That is all it takes. A language switcher now appears on your site (you can adjust its placement and other characteristics easily).

Click on that switcher and choose another language and the page will refresh. You’ll see most screen elements get blurred for a second or two, then the entire page will be machine-translated.

That includes menus, headings, category names, post names, post content, etc. Even the admin and settings screens get translated.

It is amazing. You have 85 languages to choose from, and pricing is based on how many words get translated-it doesn’t care which languages are used. It starts around $15 per month and maxes out at $45 per month for unlimited usage.

This tech also works on nearly any site. They directly support Wordpress, Joomla, Squarespace, Wix, Drupal and many E-commerce sites, etc. But the way this works for Discourse is a kind of general mechanism that can translate any site–even ones you don’t have source code or back-end access to, so long as you have a way to include that one tag.

6 Likes

Would you share your theme component?

Is it possible to customize translations (category names, topic titles …)?

3 Likes

Video guide for Linguise isn’t enough for enabling me to translate my discourse site.

At the very first step, where we need to choose our Platform, ‘Discourse’ is not an option there, and the youtube video is silent as to what to choose from that list if we’re on discourse site (and we can’t ahead move unless we make a correct choice there).

Hi Bathinda. You choose “Other cloud-hosted CMS”.

2 Likes

Hi Thomas,

You can easily create your own, empty Theme Component by going to Admin/Themes/Components.

Click on Install, and in the dialog that appears, click Create New:

On the next dialog, give it a name:

That creates an empty component. Now all you need to do is click Edit CSS/HTML:

Go to the tab called Head. There you will paste in the custome script tag that Linguise gives you when you set things up on their website:

In my image, I included some comments, but you would normally just get a blank list into which you would paste your custom Linguise URL.

Note that, working with Linguise tech support, we found that the script tag needed to be modified slightly because sometimes the page required a manual refresh when changing languages.

If you change the beginning of the tag so it starts <script defer src=… that fixes the manual refresh problem.

As a side note, these simple Custom Components can be used as a a safe and elegant way to make any overrides to the theme you are using and to affect many screen elements.

For example, on my site I have disabled a number of screen elements that I felt would just confuse my user population. To do that, on the CSS tab I added some CSS selectors with the property display: none.

For example, this suppresses the Add Section button on the sidebar:

.sidebar-wrapper .sidebar-footer-wrapper .btn-flat.add-section {
    display: none;
}

The tricky part is figuring out the CSS selectors (i.e the part before the open bracket), but if you use the developer tools on your web browser, you can generally find the screen items and copy their selectors.

Good luck!

3 Likes

This is very good and detailed explanation.
Thanks for that.

1 Like