Keyword

Multilingual site

  • Tobias
  • Tobias's Avatar Topic Author
  • Offline
  • New Member
More
7 years 5 months ago #159048 by Tobias
Multilingual site was created by Tobias
Hi!

I am running a site with two different languages using core joomla only.
So far everything switches between both languages quite well and I only had to use few overrides.
Every plugin/extension I use features multi language support, except disqus comments (so it seems).

There are a lot of languages available for the disqus comments plugin, but it wont do anything on language change in front end.
No matter which language the user chooses in front end, it always stays on the default language set in the plugins backend.

I think this must be quite an easy thing to get to work, but somehow I cant get it to work.

So any help would be appreciated!
Thank you

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 5 months ago #159059 by Krikor Boghossian
Replied by Krikor Boghossian on topic Multilingual site
Hello Tobias,

Unfortunately by design only the plugin setting's language is being loaded.
github.com/joomlaworks/disqus-comments-for-joomla/blob/master/plugins/content/jw_disqus/jw_disqus.php#L215

It can be fairly easy to load the current language tag from Joomla!'s API docs.joomla.org/JFactory/getLanguage

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Tobias
  • Tobias's Avatar Topic Author
  • Offline
  • New Member
More
7 years 5 months ago #159188 by Tobias
Replied by Tobias on topic Multilingual site
Hi Krikor,

thank you for your help!

So I would only need to create an override and change $disqusLanguage to $lang->getTag()?

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 5 months ago #159196 by Krikor Boghossian
Replied by Krikor Boghossian on topic Multilingual site
The scripts are not loaded from the override.
You could edit the lines I sent you.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Tobias
  • Tobias's Avatar Topic Author
  • Offline
  • New Member
More
7 years 4 months ago #159221 by Tobias
Replied by Tobias on topic Multilingual site
So I tried to edit the php file you mentioned, but it seems to have no effect at all.

this.language = '{$disqusLanguage}';

I tried language name and tag. Even tried typing in the language "German", but nothing seems to work.

In fact, I could type in anything I want and it wont even break the script.

Gathering the current active language in joomla works as intended though. Changing the language in the plugin (joomla backend) also works.

What am I doing wrong? Did your solution work for you?

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 4 months ago #159237 by Krikor Boghossian
Replied by Krikor Boghossian on topic Multilingual site
Can you send me a link to your site please?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
2 years 6 months ago - 2 years 6 months ago #179589 by D K
Replied by D K on topic Multilingual site
Hi,

I wonder what the solution to the problem is?

I have a website in 5 languages and I would like Disqus to appear on each in their own language.
To do this, what code to paste this.language = '{$ disqusLanguage}'; instead?
Please describe the solution.

I use a code that always sets the language of the Facebook like button to the language of the page.
<?php echo str_replace("-", "_", JFactory::getLanguage()->getTag()); ?>
I tried to put it in, but it doesn't work here.

Thanks for the help
best regards
Last edit: 2 years 6 months ago by D K.

Please Log in or Create an account to join the conversation.

More
2 years 6 months ago #179604 by JoomlaWorks
Replied by JoomlaWorks on topic Multilingual site
Try this.

Edit this file and line number github.com/joomlaworks/disqus-comments-for-joomla/blob/master/plugins/content/jw_disqus/jw_disqus.php#L98 and replace:

$disqusLanguage = $pluginParams->get('disqusLanguage');

with

$disqusLanguage = str_replace("-", "_", JFactory::getLanguage()->getTag());

Let me know.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
2 years 6 months ago #179620 by D K
Replied by D K on topic Multilingual site
Thanks :) I try.

Please Log in or Create an account to join the conversation.

More
2 years 5 months ago - 2 years 5 months ago #179639 by D K
Replied by D K on topic Multilingual site
I tried but it doesn't work.
I tried this way, but nothing: $disqusLanguage = str_replace("-",  JFactory::getLanguage()->getTag());
Do you have another idea?

I have another problem.
Can the comment link on the category page be overwritten with php? This is important for a multilingual website. But if I overwrite it in another language, the text will still only appear in English. What is the solution?

I think this is php: <?php echo JText::_("JW_DISQUS_ADD_A_COMMENT"); ?>

   

I would like to display this text in multiple languages.

Thanks for the help
best regards
 
Attachments:
Last edit: 2 years 5 months ago by D K.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum