News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

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 3 Guests 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
  •