Welcome, Guest
Username Password: Remember me

Translate EXTRAS
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Translate EXTRAS

Translate EXTRAS 1 year, 8 months ago #415

  • justin
  • OFFLINE
  • Fresh Boarder
  • Posts: 18
I wonder where they can be translated EXTRAS -{EXTRAS_HEADER} and TOTAL EXTRAS in dobooking.html - Error in code.

This image is hidden for guests. Please log in or register to see it.

This image is hidden for guests. Please log in or register to see it.

I use template mira 1.6.
Last Edit: 1 year, 8 months ago by justin.

Re: Translate EXTRAS 1 year, 8 months ago #416

  • piranha
  • OFFLINE
  • Jomres Extras Developer
  • Posts: 532
Actually that text is not translatable, as you can see it`s hard coded into the template html, because that text is not available as output in the jomres booking form.
Become our fan on Facebook and be the first to find out about new releases, updates and discounts Jomres Extras Facebook Page

Re: Translate EXTRAS 1 year, 8 months ago #417

  • justin
  • OFFLINE
  • Fresh Boarder
  • Posts: 18
Can you tell me how to insert text in the code that would work. There is an urgent need for translation.

Re: Translate EXTRAS 1 year, 8 months ago #418

  • piranha
  • OFFLINE
  • Jomres Extras Developer
  • Posts: 532
OK, Please follow this step by step:

1. In en-GB.php and all other language files, at the bottom, add 2 new definitions for "EXTRAS" and "Extras Total" like this:

define('_JOMRES_AJAXFORM_CUSTOM_JEXTRAS_TITLE','EXTRAS');
define('_JOMRES_AJAXFORM_CUSTOM_JEXTRAS_TOTAL','Extras Total');

2. edit dobooking.class.php and at approx line 971 you see "function makeOutputText()". Go at the end of this function at approx line 1064, right before "return $output;" and add:

$output['JEXTRAS_TITLE']=$this->sanitiseOutput(jr_gettext('_JOMRES_AJAXFORM_CUSTOM_JEXTRAS_TITLE', _JOMRES_AJAXFORM_CUSTOM_JEXTRAS_TITLE));
$output['JEXTRAS_TOTAL']=$this->sanitiseOutput(jr_gettext('_JOMRES_AJAXFORM_CUSTOM_JEXTRAS_TOTAL', _JOMRES_AJAXFORM_CUSTOM_JEXTRAS_TOTAL));

3. In dobooking.html and dobooking_srp.html (located in /jomres/remote_plugins/je_mira/frontend) where you see the untranslatable/hardcoded text "EXTRAS" and "Extras Total", replace that text with {JEXTRAS_TITLE} and {JEXTRAS_TOTAL}

I think this is it...
Become our fan on Facebook and be the first to find out about new releases, updates and discounts Jomres Extras Facebook Page
Last Edit: 1 year, 8 months ago by piranha.

Re: Translate EXTRAS 1 year, 8 months ago #419

  • justin
  • OFFLINE
  • Fresh Boarder
  • Posts: 18
does not work

Re: Translate EXTRAS 1 year, 8 months ago #420

  • piranha
  • OFFLINE
  • Jomres Extras Developer
  • Posts: 532
You`re right, remove the code you added in dobooking.class.php and edit /jomres/libraries/jomres/functions/dobooking.php at approx line 337 you see:

$extrasH ['EXTRAS_HEADER']='
<tr>
<th colspan="5">'.$output['AJAXFORM_EXTRAS_DESC'].'</th>
</tr>
';

Exactly after this (before $extrasHeader[]=$extrasH;) add:

$extrasH['JEXTRAS_TITLE']=$this->sanitiseOutput(jr_gettext('_JOMRES_AJAXFORM_CUSTOM_JEXTRAS_TITLE', _JOMRES_AJAXFORM_CUSTOM_JEXTRAS_TITLE));
$extrasH['JEXTRAS_TOTAL']=$this->sanitiseOutput(jr_gettext('_JOMRES_AJAXFORM_CUSTOM_JEXTRAS_TOTAL', _JOMRES_AJAXFORM_CUSTOM_JEXTRAS_TOTAL));

It should work after that...this time I also tested this.
Become our fan on Facebook and be the first to find out about new releases, updates and discounts Jomres Extras Facebook Page

Re: Translate EXTRAS 1 year, 8 months ago #423

  • justin
  • OFFLINE
  • Fresh Boarder
  • Posts: 18
not yet OK

This image is hidden for guests. Please log in or register to see it.

Re: Translate EXTRAS 1 year, 8 months ago #424

  • piranha
  • OFFLINE
  • Jomres Extras Developer
  • Posts: 532
Instead of

$extrasH['JEXTRAS_TITLE']=$this->sanitiseOutput(jr_gettext('_JOMRES_AJAXFORM_CUSTOM_JEXTRAS_TITLE', _JOMRES_AJAXFORM_CUSTOM_JEXTRAS_TITLE));
$extrasH['JEXTRAS_TOTAL']=$this->sanitiseOutput(jr_gettext('_JOMRES_AJAXFORM_CUSTOM_JEXTRAS_TOTAL', _JOMRES_AJAXFORM_CUSTOM_JEXTRAS_TOTAL));

try this:

$extrasH['JEXTRAS_TITLE']=jr_gettext('_JOMRES_AJAXFORM_CUSTOM_JEXTRAS_TITLE', _JOMRES_AJAXFORM_CUSTOM_JEXTRAS_TITLE);
$extrasH['JEXTRAS_TOTAL']=jr_gettext('_JOMRES_AJAXFORM_CUSTOM_JEXTRAS_TOTAL', _JOMRES_AJAXFORM_CUSTOM_JEXTRAS_TOTAL);
Become our fan on Facebook and be the first to find out about new releases, updates and discounts Jomres Extras Facebook Page

Re: Translate EXTRAS 1 year, 8 months ago #425

  • justin
  • OFFLINE
  • Fresh Boarder
  • Posts: 18
We managed to.

The correct code is

$extrasH['JEXTRAS_TITLE']=$bkg->sanitiseOutput(jr_gettext('_JOMRES_AJAXFORM_CUSTOM_JEXTRAS_TITLE',_JOMRES_AJAXFORM_CUSTOM_JEXTRAS_TITLE));
$extrasH['JEXTRAS_TOTAL']=$bkg->sanitiseOutput(jr_gettext('_JOMRES_AJAXFORM_CUSTOM_JEXTRAS_TOTAL',_JOMRES_AJAXFORM_CUSTOM_JEXTRAS_TOTAL));

Thanks piranha
  • Page:
  • 1
Time to create page: 0.42 seconds