Joomla 5 Notice

We are pleased to announce that as of January 29, 2024, all of our Joomla extensions are compatible with Joomla 5.

For all who are still updateing from Joomla 3 to Joomla 4: Joomla 4 Migration instructions are available here:

There is now a separate Documentation for Visforms for Joomla 4 and for Visforms for Joomla 5!

Forum

Visforms Subscription user can ask questions in our forum. Please log in with the relevant user first.
Everybody can access the forum for reading.

Please only ask 1 question per topic.

Button Translations doesn't works

More
7 years 3 months ago #3880 by gigiograndi
Button Translations doesn't works was created by gigiograndi
Hy

I've two buttons and the Summary page with component setting, but the buttons still remain in english. I've printed the screens with settings, but i can't show there.

What goes wrong?

Regards

More
7 years 3 months ago #3881 by gigiograndi
Replied by gigiograndi on topic Button Translations doesn't works
News: Only the "back" button remain the same. Any suggestion?

More
7 years 3 months ago #3882 by Administrator AV
Replied by Administrator AV on topic Button Translations doesn't works
Translation files for Visforms are not made by myself.
Maybe the translation is missing in the italian translation, because it was made for an older Visforms Version or the file has an error...

The langauge-tag used for the defalut text for this button is COM_VISFORMS_STEP_BACK
So maybe you have to create a translation by yourself in the Joomla! language manager.

But there is also an option in the form configuration something like "Back Button Text" i("Advanced" ) where you can just enter the button text, which would make translation superfluuos.

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

More
7 years 3 months ago #3883 by gigiograndi
Replied by gigiograndi on topic Button Translations doesn't works
Hy

I've already added the translation in "Back Button Text" ("Advanced" ), but nothing changes, that's i'm here to call for a little help :)

More
7 years 3 months ago - 7 years 3 months ago #3884 by Administrator AV
Replied by Administrator AV on topic Button Translations doesn't works
Hi,

ok. I can see, this is not the intended behavior. Actually it looks as if I missed to add the text, which you can set in the form configuration, at some code parts, therefore it is not always used.

To fix it, you have to make the following changes, which I will merge into the Visforms Subscription core.

Open the file components\com_visforms\lib\field\pagebreak.php (make a backup copy of the file first)
Add a new function to the class by adding the following code just before the last closing } of the file
Code:
protected function setBackBtnText() { $this->field->backbtntext = $this->form->backbtntext; }

Replace the code
Code:
protected function setField() { $this->extractDefaultValueParams(); $this->setFieldDefaultValue(); $this->setCustomJs(); $this->setFieldsetCounter(); $this->addFormStep(); }

with
Code:
protected function setField() { $this->extractDefaultValueParams(); $this->setFieldDefaultValue(); $this->setCustomJs(); $this->setFieldsetCounter(); $this->addFormStep(); $this->setBackBtnText(); }

Save changes and close file

Further on you have to modify the layout files which create the button, too.
These files exist in the following path where LAYOUTNAME is
bt3default, bt3horizontal, bt3mcindividual, btdefault, default, edit, editbt3default,editbt3horizontal, editbt3mcindividual, editbtdefault, editmcindividual and mcindividual

If you do not use the frontend edit feature or bt3layouts, you can skip these path. Changes will come with the next subscription release.

Open the file components\com_visforms\layouts\visforms\LAYOUTNAME\pagebreak\control.php (make a backup copy of the file first)

Replace the code
Code:
if ((!empty($field->fieldsetcounter)) && ($field->fieldsetcounter > 1)) { //add a back button $html .= '<input type="button" class="btn back_btn" value="'.JText::_('COM_VISFORMS_STEP_BACK').'"/> '; }

with
Code:
if ((!empty($field->fieldsetcounter)) && ($field->fieldsetcounter > 1)) { $backButtonText = (!empty($field->backbtntext)) ? $field->backbtntext : JText::_('COM_VISFORMS_STEP_BACK'); //add a back button $html .= '<input type="button" class="btn back_btn" value="'.$backButtonText.'"/> '; }

Save changes and close file.
This should fix the problem.

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).
Last edit: 7 years 3 months ago by Administrator AV.

More
7 years 3 months ago #3885 by gigiograndi
Replied by gigiograndi on topic Button Translations doesn't works
Hy

Seems to be ok. I've to do this customizations if a new version come in, or ALL that are included?

Regards

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum