Page 1 of 1

Questions to date format and translation

Posted: 29 Jul 2019, 02:27
by trpgforum
Hello Karl

Since two weeks I'm at work on my website https://www.thomas-ruf.ch.

And what I can say: I'm very happy with Photo Gallery X3: Beautiful, fast and easy to work with! The best solution for me - thanks for this great work!

 But as it happens at work, some questions arise every now and then:
  1. In my  Blog https://www.thomas-ruf.ch/blog/ I hav ethe date format eg 2019-07-16. But in Switzerland, Germany and Austria that's the wrong Format. Here it must be shown 16.07.2019 (dd.mm.yyyy). Where can I change this format?
  2. In the main page of my galleries https://www.thomas-ruf.ch/fotogalerien/ is listened the count of images per Gallery. But the word Images is in english. Where can I translate, so that is standing here eg 105 Bilder or 105 Fotos?
Thans für help!

Kind regards
Thomas

Re: Questions to date format and translation

Posted: 29 Jul 2019, 13:10
by mjau-mjau
Hi Thomas, and thanks!
trpgforum wrote:In my  Blog https://www.thomas-ruf.ch/blog/ I hav ethe date format eg 2019-07-16. But in Switzerland, Germany and Austria that's the wrong Format. Here it must be shown 16.07.2019 (dd.mm.yyyy). Where can I change this format?
I am assuming you already changed the date format from Settings > Advanced > Date format?
Image

I assume it's now set to Y-m-d? You should be able to manually enter your own format after deleting the existing entry. To achieve 16.07.2019, you can just use d.m.Y:
Image
trpgforum wrote:In the main page of my galleries https://www.thomas-ruf.ch/fotogalerien/ is listened the count of images per Gallery. But the word Images is in english. Where can I translate, so that is standing here eg 105 Bilder or 105 Fotos?
It is not yet possible to easily translate the text like "images" in X3, because it is currently hardcoded. Until translations are included, you could use this Javascript fix. Add the following code into Settings > Custom > Custom Javascript:
Code
function x3_load_page(){
  var amounts = document.getElementsByClassName('amount');
  if(amounts.length){
    for(var i=0; i<amounts.length; i++){
      var span = amounts[i].children[0];
      var amount = parseInt(span.innerText);
      span.innerText = amount + ' Bilder';
    }
  }
}
Just replace "Bilder" with the word you want to use.

Re: Questions to date format and translation

Posted: 30 Jul 2019, 02:19
by trpgforum
Thank you so much Karl! 

That's unbelievably good, your support! Since big companies should learn from you ;-)

Joking aside: Could solve easily now both problems with your informations! 
The date format, however, I have now used d.m.20y, so I get 4-digit years displayed.

Best greetings from Switzerland
Thomas

Re: Questions to date format and translation

Posted: 30 Jul 2019, 04:26
by mjau-mjau
trpgforum wrote:The date format, however, I have now used d.m.20y, so I get 4-digit years displayed.
d.m.Y = 30.07.2019
d.m.y = 30.07.19

It should already output four-digit year when using UPPERCASE Y, while lowercase y represents two-digit year. Of course, your solution 20y should work also, but then you will need to change it when we get to the year 3000 :smile:

Re: Questions to date format and translation

Posted: 30 Jul 2019, 04:36
by trpgforum
:joy:  :joy:  :joy: