- Posts: 4
- Thank you received: 0
Kunena 6.2.6 released
The Kunena team has announce the arrival of Kunena 6.2.6 [K 6.2.6] which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x. This version addresses most of the issues that were discovered in K 6.1 / K 6.2 and issues discovered during the last development stages of K 6.2
Solved [SOLVED] How to force the notification language?
I am setting a new forum on a multilingual site. The particularity is that while the site can be translated into several languages, I want the forum to stay in English. A message appears asking everyone to write their messages in English even if the interface is in French for instance.
The problem is that when someone writes a reply, the notification emails sent to all subscribers are in the current language of the user that is writing the message, not in the language of the subscribers. Is it possible to sent notifications with the appropriate language of each subscriber? If no, is it possible to force the notifications (and the links inside) to be in English?
Regards,
Davy
Please Log in or Create an account to join the conversation.
This is a feature that we have a mind, but it's something not easy to do, i can't say for now in which Kunena version it will be set.
I don't provide support by PM, because this can be useful for someone else.
Please Log in or Create an account to join the conversation.
Is there a way to remove the translation process? (with hard-coded strings in the code for instance). Even if it is an ugly fix I would find this acceptable. What file could I modify?
Please Log in or Create an account to join the conversation.
I think you mean these lines of notifications?:
You can find those lines from the administration language file xx-XX.com_kunena.libraries.ini
You can do overrides from the Joomla backend: Extensions -- Language(s) -- Overrides or direct to language files...
I haven't tested this but it should be work... then user with a language other than English, should get the notifications emails in English. Inform if you test this.
Please Log in or Create an account to join the conversation.
I have another question before doing a test and posting a solution.
I found the file libraries/kunena/forum/message/message.php which creates the email with the last function "attachEmailBody". It could be possible to patch it so that I don't need to change the translations anymore, though I understand that it's a bad fix (I would need to patch it after each update of Kunena).
What is still bothering me is that a url is attached to the email so that we can go to the message that has been posted, and this url is also linked to the current language of the user that wrote the message on the forum. For example here is the url that I could receive:
Please Log in or Create an account to join the conversation.
If you do overrides from Joomla backend Extensions -- Language(s) -- Overrides for those lines to each languages, you don't need to do that again when new language packages are available and you install it... Overwrite will always remain for those lines.Mezzo wrote: Yes that's it
It could be possible to patch it so that I don't need to change the translations anymore, though I understand that it's a bad fix (I would need to patch it after each update of Kunena).
EDIT: a little bit old Joomla! Documentation of J! overrides but its almost same in J! 3.6.2
docs.joomla.org/J3.x:Language_Overrides_in_Joomla
Please Log in or Create an account to join the conversation.
The methods getPermaUrl or getPermaUri doesn't handle multi-language, i need to check if these methods can be changed to do thatMezzo wrote: Yes that's it
I have another question before doing a test and posting a solution.
I found the file libraries/kunena/forum/message/message.php which creates the email with the last function "attachEmailBody". It could be possible to patch it so that I don't need to change the translations anymore, though I understand that it's a bad fix (I would need to patch it after each update of Kunena).
What is still bothering me is that a url is attached to the email so that we can go to the message that has been posted, and this url is also linked to the current language of the user that wrote the message on the forum. For example here is the url that I could receive:But I want this, always in english ("fr" becomes "en"):Code:http://mysite.com/fr/forum/category_name/topic_name#12I can of course add a function to replace "/XX/forum/" into "/en/forum/", but I was wandering if there is no other solutions, for example by slightly modifying the function "getPermaUrl" or "getPermaUri".Code:http://mysite.com/en/forum/category_name/topic_name#12
I don't provide support by PM, because this can be useful for someone else.
Please Log in or Create an account to join the conversation.
I understand that using overrides prevents an update to reinitialize the translations but there is still the problem with the url that can point to the site with a language other than English. I need to patch anyway.
I edited the file "components/com_kunena/template/system/layouts/email/subscription/default.php" (and not "libraries/kunena/forum/message/message.php" as I mentioned) and it worked.
I set manually the text (no translations anymore) and I modified the url with:
I'll keep a track of these changes so that if Kunena is updated, I can patch again.
Regards,
Davy
Please Log in or Create an account to join the conversation.