News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

Main Menu
Support-Forum

Text in layouts on multilingual site

Started by dyfrig, 10.11.2018 13:00:57

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dyfrig

I have created a files layout which looks like the attached image

The date and meeting columns are custom fields.

I did this with the following lines

Use before Layout
 

  <table class="cyfarfodydd">
  <tr><td>Date</td><td>Meeting</td><td>Click below to view document</td></tr>
Layout
  <tr><td>{custom_value_11}</td><td>{custom_value_2}</td><td>{file_title}&#160;{file_pic}</td></tr>
Use after Layout
  </table>

My problem is that this is a bilingual site, but the column headers are in one language only.  I tried to put language codes in the Use before Layout section, but they were not parsed. I also tried to use {custom_title_11} etc in column header but that also appeared literally on the page.  Can you suggest a way this could be achieved.


[gelöscht durch Administrator]
  •  

dyfrig

 I have managed to achieve the desired effect as follows

Use before layout



<table class="cyfarfodydd">
  <tr>
    <td><span class="cygb">Dyddiad</span><span class="engb">Date</span></td>
    <td><span class="cygb">Cyfarfod</span><span class="engb">Meeting</span></td>
    <td><span class="cygb">Cliciwch isod i weld dogfen</span><span class="engb">Click below to view document</span></td>
  </tr>



Then in the CSS

  span.engb:lang(cy-GB) {display:none;}
  span.cygb:lang(en-GB) {display:none;}



If you can suggest an easier way then please do so otherwise please consider matter resolved.
  •  

ColinM

Hi
I was about to reply when your solution appeared!!  Your solution is of turning off the display when the current language does not match is very neat for a pair of languages.  I am not experienced at multi languages so had to look up the relevant css!! 

In the next jD series (jd3.9) the special jD Custom fields willl no longer be supported and use will be made of the new Joomla Fields.  I suspect the initial version of jd3.9 will have liimited support for Joomla Fields.
My only other comment is that tables are sometimes trouble on small devices.  You basic solution should work fine with divs and using jd_clear as required.Colin
Colin M
  •