Skip to main content

Translatepress support possible?

Do you think that translatepress support would be possible in the near, medium term? I know that fluentcommunity is built on react for speed so concerned this might be an issue

Shahjahan Jewel

First of all it’s not built with react. The front end is build with vuejs 3. FluentCommunity is 100% translatable and compatible with any pot based translation plugins like loco translate.

by the way who told you it’s built with react?

M. Stevens

Shahjahan JewelΒ TranslatePress works differently, since it translates everything. The translation-GUI for TranslatePress is not loaded into FluentCommunity at this moment. This is also important for us. We want to ditch BuddyBoss and LearnDash, but want to provide multiple language (course) content for our users.

Jack Reeves

M. StevensΒ exactly. thanks for clearly explaining what I was trying to articulate :) hopefully Shahjahan JewelΒ can get back with an answer if this is possible or if i need to move to webglot

Morgan McArthur

Shahjahan JewelΒ this is what i was referring too in the live chat update about TranslatePress compatibility. What can you say about the comments in this pose and how TranslatePress can work with FluentCommunity 100%?

Many of us use TranslatePress with buddyBoss and it works flawlessly. Making sure this can be the same with FluentCommunity

Jack Reeves

OK so i did some more digging. Basically heres what ive found and how you can start to get it working.

  1. the translatepress language switcher doesnt work so you have to add lang to url directly
  2. You can get in fact access and translate things if you start on a normal wordpress page and then direct yourself to the community by clicking on a link while in edit translation mode
  3. The editor allows you to edit all items but they will not all show up on front end. The left hand and top navigation works well with translation but the main window for feed does not change. Seems like it might be just firing later than translate press.

This gives me confidence that with a bit of help Shahjahan JewelΒ this can be made to work.

M. Stevens

Jack ReevesΒ That's nice. This makes it possible to start migration from BuddyBoss. It would be nice to see Shahjahan JewelΒ provide an update for this.

Manuel Lewin

That would be fantastic!!!!!!!!!!!!

Jack Reeves

TranslatePress provides hooks and filters you can use to modify how translations are applied. For dynamic feeds, hook into Vue’s lifecycle or events and trigger window.tp.hooks.applyTranslations() when content updates.

Example with Vue’s mounted or updated:

export default {

Β  Β  mounted() {

Β  Β  Β  Β  if (typeof window.tp !== "undefined" && window.tp.hooks && window.tp.hooks.applyTranslations) {

Β  Β  Β  Β  Β  Β  window.tp.hooks.applyTranslations();

Β  Β  Β  Β  }

Β  Β  },

Β  Β  updated() {

Β  Β  Β  Β  if (typeof window.tp !== "undefined" && window.tp.hooks && window.tp.hooks.applyTranslations) {

Β  Β  Β  Β  Β  Β  window.tp.hooks.applyTranslations();

Β  Β  Β  Β  }

Β  Β  }

};

\

Connery Johnson

Jack ReevesΒ if this works it would be amazing!

Could you explain where I need to place this code?

I have FluentCommunity and TranslatePress Developer installed on a site right now and am desperate to get TranslatePress running!