Author Topic: Backend: pages overview with language flags  (Read 114 times)

Offline dbs

  • Betatester
  • **
  • Posts: 7920
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Backend: pages overview with language flags
« on: June 08, 2019, 08:26:08 AM »
Hello, in the pages overview for multilingual reasons maybe it is clearer to have language flags instead of text DE, EN, NL, FR on the right side (last position). See attached picture (pdf). To change that it is only one thing to do.

Go to admin/pages/index.php line 311 (in WB 2.12.1 & 2.12.2).
Change from
Code: [Select]
<?php echo $page['language']; ?>
to
Code: [Select]
<img src="<?php echo WB_URL?>/modules/WBLingual/flags/svg/<?php echo strtolower($page['language']); ?>.svg" style="width:20px;opacity:0.5" title="<?php echo $page['language']; ?> " alt="<?php echo $page['language']; ?> " />

Now you see flags. I've given 50% transparency.
You can change width and transparency (width:20px;opacity:0.5) to your needs.
Also you can use png or jpg but the right path is little bit different.

After a WB update this changes will be overwritten. You have to repeat the action.

edit: this was posted by jacobi22 somewhere for a older WB version. Found this in my notices.
« Last Edit: June 08, 2019, 08:39:16 AM by dbs »

Offline crnogorac081

  • Posts: 1895
  • Gender: Male
Re: Backend: pages overview with language flags
« Reply #1 on: June 08, 2019, 09:12:27 AM »
Nice. Should be replaced in core
no bb in signature

Offline hgs

  • Betatester
  • **
  • Posts: 1102
    • EFG MG
Re: Backend: pages overview with language flags
« Reply #2 on: June 08, 2019, 10:23:37 AM »
Thanks jacobi22 for posting.  (Y)
Thanks dbs for finding again.  (Y)

Join me at crnogorac081 and would be happy if it becomes a fixed part in the next version.  :-)
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

Offline jacobi22

  • Posts: 5836
  • Gender: Male
  • Support also via PM or EMail
    • Jacobi22
Re: Backend: pages overview with language flags
« Reply #3 on: June 08, 2019, 10:48:50 AM »
looks nice and easy, but....

the page overview is the page with the most visits inside of WB and everytime, when you come to this overview, it search for the picture path in every loop of the page tree, means: for every page in the tree. it doesn't matter, that the picture come's at the end from the browser cache, the script has to follow this paths and then, it can say: okay, i've the same path im my cache.

i've not stop the loading time and dont now, how big is the different between a text-output and the icon, but if i count a millisecond for every icon, it's easy to understand, that the backend go'es slower and slower with every new page in the tree.

from my point: the flag is good, look also "professionell" and show me the different, specially in new projects, when i add a new language and forgot to change the page language. i'm not living in the page overview, i've been there for a job, for one hour / week - so i can accept a slower page with more service, but i dont use it on bigger projects - actual one project with 116 Pages per language, 6 languages in the project - that makes 3 or four seconds more waiting time on the overview.
i remember, that we talk often about this picture and (if i remember correct) it was also a part in WB 2.8.4 - i understand the opinion of the dev's, but i see also the problems in the overview to detect the page language. In a big list, you see only letters

why not a switch in the settings, maybe as globale switch for all settings, because, the problem (loading time) is also on the select boxes for DSGVO, module info, page language select etc
Probleme sind da, um sie zu lösen, nicht, um nach Ausreden zu suchen.

Offline dbs

  • Betatester
  • **
  • Posts: 7920
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Backend: pages overview with language flags
« Reply #4 on: June 08, 2019, 11:11:38 AM »
This is a good point. We should collect some loading times for installations with x pages.
Maybe until 50 pages the different is marginal.