[SOLVED] Time stamp translation to French
identicon
Kat#b0d39
DISCUSSION OF ORIGIN

Kat#b0d39 Sunday 22nd May 2016, 14:30:15

solved Time stamp translation to French

When a post is very recent, its time stamp is displayed in hours and minutes, not with the day.
To display it, a lang string **ago** was created. In the code of Utilisi.lib.php, the lang string is called after the timestamp value. In order to give a "2 hours ago" sentence, English way. In French however, and certainly in other languages too, this order gives a hardly understandable result : "2 heures avant".
So, I created a new string **ilya** that I settled before the time stamp in the code. This string is empty in the English file, while the string ago is empty in French.

An I get a correct display in both languages. I know it is very difficult to make multilingual available in softwares, because of the different ways languages are built. Sorry if my trick looks dilettante. I AM a dilettante.

![http://i.imgur.com/2bl60jg.png](http://)
DISCUSSION OF ORIGIN
Fred_f8768
Fred#f8768

Administrator

Fred_f8768

See their activity.

Fred#f8768 Sunday 22nd May 2016, 15:07:15

Sorry but i don't understand the problem.

If don't want have the phrases in date format, change the date format settings, look here, is not the default config.
For the 'activity' methode, leave Y/m/d H:i format, for international use this tip : M j, 'y g:i a.
Or change the translation in language file...

*Ps: Moved to 'General Questions' forum.*
identicon
Kat#b0d39

Kat#b0d39 Sunday 22nd May 2016, 16:07:06

Sorry, Fred. I did not mean to be rude.
I find the timestamp display interesting and I wish to keep it if possible, but changing the lang strings is not enough : because of the element orders in the code, the sentence does not mean anything in French. "2 heures avant" is not correct, in this case, not understandable.

![http://i.imgur.com/D8LcI0f.png](http://)

I understand the importance of building a forum for English speakers who are numerous, but your forum is meant to be multilingual, from what I see. I am no coder, but I happened to translate softwares over the years. And I often met this kind of tiny problems.

Since I would hate to fork such a brand new and clean code, I will study your suggestion of changing the date format settings.

Thank you for eveything you do.

Katryne
Fred_f8768
Fred#f8768

Administrator

Fred_f8768

See their activity.

Fred#f8768 Sunday 22nd May 2016, 16:18:06

How to translate '2 heures avant' in correct French please?
I made some corrections for the next version.
Including the color field to make it compatible with most browsers.
identicon
Kat#b0d39

Kat#b0d39 Sunday 22nd May 2016, 16:35:15

Thanks a lot ! And for the color field too ...
"2 hours ago" should be translated with " il y a 2 heures"
If I can be of help, just ask.
Fred_f8768
Fred#f8768

Administrator

Fred_f8768

See their activity.

Fred#f8768 Sunday 22nd May 2016, 20:11:02

  Ok is done!
The next version have this fix wink
Suggested Topics View / Reply Forum
Simon started solved 🇫🇷 Bug de la navbar sur iPad 1.5K / 5 Bug reports
hmmy 🐝 started Infitite Scroll + Timeline Slider 1.3K / 3 Feature Requests
AlexanderLiebrecht started plugin Small Fixes to the Google Tools Plugin 1.6K / 4 General Questions
PI started Just trying 662 / 0 Open Bar
Top