Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#26 2019-04-12 04:55:00

Ariaan
Member
From: Hengelo, The Netherlands
Registered: 2016-05-18
Posts: 41
Website

Re: Issues with the Multi Language support of Backlight2

Strange. When I write this in the Invitation field:
<div data-lang="nl">Neem voor meer informatie contact met mij op.</div>
<div data-lang="en">>Please contact me for more information.</div>

I get this in the page source:
<p><div data-lang="nl">Neem voor meer informatie contact met mij op.</div>
<div data-lang="en">>Please contact me for more information.</div></p>
It's placed within <p></p>

When I write this in the Invitation field:
<span style="font-weight:bold;" data-lang="nl">Neem voor meer informatie contact met mij op.</span>
<span style="font-weight:bold;" data-lang="en">Please contact me for more information.</span>

I get this in the page source:
<p><p><span style="font-weight:bold;" data-lang="nl">Neem voor meer informatie contact met mij op.</span>
<span style="font-weight:bold;" data-lang="en">Please contact me for more information.</span></p></p>
It's placed withing <p><p></p></p>

And when I write this in the Invitation field:
<span style="font-weight:bold;" data-lang="nl">Neem voor meer informatie contact met mij op.</span>
<span style="font-weight:bold;" data-lang="en">Please contact me for more information.</span>

I get this in the page source:
<p><p><span style="font-weight:bold;" data-lang="nl">Neem voor meer informatie contact met mij op.</span>
<span style="font-weight:bold;" data-lang="en">Please contact me for more information.</span></p></p>
Also double p-tags.
I don't know if that is significant.

I tested a new contact form (Contact Test) and it also shows double p-tags in the source:

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam eu blandit nisl. Suspendisse    potenti. Pellentesque varius sagittis nibh, quis vulputate sapien molestie eget. Nulla suscipit lobortis placerat. Duis ultricies faucibus metus pellentesque vestibulum. Sed lobortis, lorem vitae tempus vestibulum, massa augue tempus quam, eu convallis orci nisl nec elit. Donec rutrum viverra magna id ornare. Sed sed leo elementum, malesuada nulla quis, pretium libero.</p>
   
<p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus semper ipsum nibh. Proin vitae erat at enim semper placerat non in metus. Praesent et sodales orci. Maecenas tristique ultricies lorem non lacinia. Mauris sem elit, scelerisque vel laoreet at, placerat a nibh. In nec nunc vel neque sollicitudin euismod. Mauris vitae lorem dui.</p>
<p>Phasellus ac tortor ante. Nulla ornare turpis et viverra bibendum. Integer non dolor id neque scelerisque sollicitudin. Vestibulum at elementum augue, eget pulvinar lectus. Phasellus imperdiet magna eu dignissim suscipit. Fusce venenatis arcu neque, in dignissim quam elementum sed. Nullam massa sapien, bibendum ac sollicitudin ullamcorper, commodo at lacus. Vivamus condimentum at orci nec mollis.</p></p>

And if I put the language code in the fields of this new form, they also lose their bold type and the asterisks moves to the next line.
So the divs in these fields are acting as a sort of line break, it seems.

Offline

#27 2019-04-12 07:04:20

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Issues with the Multi Language support of Backlight2

It looks to me that in the contact form, Markdown is surrounding all html content <p> tags. This doesn't happen in regular page content.

Not sure why.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#28 2019-04-12 07:29:59

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Issues with the Multi Language support of Backlight2

I just added some language code to a test contact form and page. It seems to be working as expected for me.
http://backlight-2-100.barbeephoto.com/multi-contact/

Be sure to use spans rather than divs in language label fields. That should solve the asterisk issue. And as Daniel pointed out, you shouldn't need to add any styling for those, as the default is for those to be bold anyway.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#29 2019-04-12 15:15:55

Ariaan
Member
From: Hengelo, The Netherlands
Registered: 2016-05-18
Posts: 41
Website

Re: Issues with the Multi Language support of Backlight2

Daniel Leu wrote:

Using the <span></span> tag should do the trick:

<span data-lang="en">Telephone</span><span data-lang="fr">Téléphone</span><span data-lang="de">Telefon</span>

Wow, thanks Daniel, this did the trick!

Offline

#30 2019-04-12 15:17:36

Ariaan
Member
From: Hengelo, The Netherlands
Registered: 2016-05-18
Posts: 41
Website

Re: Issues with the Multi Language support of Backlight2

Daniel Leu wrote:

Using the <span></span> tag should do the trick:

<span data-lang="en">Telephone</span><span data-lang="fr">Téléphone</span><span data-lang="de">Telefon</span>
rod barbee wrote:

I just added some language code to a test contact form and page. It seems to be working as expected for me.
http://backlight-2-100.barbeephoto.com/multi-contact/

Be sure to use spans rather than divs in language label fields. That should solve the asterisk issue. And as Daniel pointed out, you shouldn't need to add any styling for those, as the default is for those to be bold anyway.



Wow, thanks Daniel and Rod, this did the trick!

Offline

#31 2019-04-12 15:26:54

Ariaan
Member
From: Hengelo, The Netherlands
Registered: 2016-05-18
Posts: 41
Website

Re: Issues with the Multi Language support of Backlight2

Why does the span work in the contact form labels, but not in the menu items, where I have to use div? What is the difference?

Last edited by Ariaan (2019-04-12 15:27:18)

Offline

#32 2019-04-12 22:58:32

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Issues with the Multi Language support of Backlight2

spans are inline elements and divs are block elements, that probably has something to do with it.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#33 2019-04-13 00:37:23

Ariaan
Member
From: Hengelo, The Netherlands
Registered: 2016-05-18
Posts: 41
Website

Re: Issues with the Multi Language support of Backlight2

Ah, okay.

Offline

Board footer

Powered by FluxBB