[SOLVED] Time stamp translation to French

solved Time stamp translation to French
Kat#b0d39 Sunday 22nd May 2016, 14:30:15

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://)

Replies 5
Fred
Fred  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.*
  • Before ask a question, read the documentation.
  • 🎉  Featured as #1 product of the day on Product Hunt
  • Please like in alternativeto.net 👍🏻
  • ╰☆╮Flatboard╰☆╮ is a open source and community contributions are essential to project success!
  • <TextField>, my new CMS project designed by a passionate developer, for developers!
  • My last project Fast⚡︎CMS, a Flat-File cms.
  • I am currently busy 😫.

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
Fred  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.
  • Before ask a question, read the documentation.
  • 🎉  Featured as #1 product of the day on Product Hunt
  • Please like in alternativeto.net 👍🏻
  • ╰☆╮Flatboard╰☆╮ is a open source and community contributions are essential to project success!
  • <TextField>, my new CMS project designed by a passionate developer, for developers!
  • My last project Fast⚡︎CMS, a Flat-File cms.
  • I am currently busy 😫.

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
Fred  Sunday 22nd May 2016, 20:11:02

  Ok is done!
The next version have this fix ;)
  • Before ask a question, read the documentation.
  • 🎉  Featured as #1 product of the day on Product Hunt
  • Please like in alternativeto.net 👍🏻
  • ╰☆╮Flatboard╰☆╮ is a open source and community contributions are essential to project success!
  • <TextField>, my new CMS project designed by a passionate developer, for developers!
  • My last project Fast⚡︎CMS, a Flat-File cms.
  • I am currently busy 😫.