- Posts: 3
COMMUNITY FORUM
Multilingual site
- Tobias
- Topic Author
- Offline
- New Member
Less
More
7 years 11 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
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
The topic has been locked.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 11 months ago #159059
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
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
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 :)
The topic has been locked.
- Tobias
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
7 years 11 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()?
thank you for your help!
So I would only need to create an override and change $disqusLanguage to $lang->getTag()?
The topic has been locked.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 11 months ago #159196
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Multilingual site
The scripts are not loaded from the override.
You could edit the lines I sent you.
You could edit the lines I sent you.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
The topic has been locked.
- Tobias
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
7 years 11 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?
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?
The topic has been locked.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 11 months ago #159237
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
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 :)
The topic has been locked.
- D K
- Offline
- New Member
Less
More
- Posts: 3
3 years 4 weeks ago - 3 years 4 weeks 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
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: 3 years 4 weeks ago by D K.
The topic has been locked.
- JoomlaWorks
- Offline
- Admin
Less
More
- Posts: 6214
3 years 3 weeks ago #179604
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
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.
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 :)
The topic has been locked.
- D K
- Offline
- New Member
Less
More
- Posts: 3
3 years 2 weeks ago #179620
by D K
Replied by D K on topic Multilingual site
Thanks :) I try.
The topic has been locked.
- D K
- Offline
- New Member
Less
More
- Posts: 3
3 years 1 week ago - 3 years 1 week 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
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: 3 years 1 week ago by D K.
The topic has been locked.