French formatted date in Smart Text
- Stéphan
-
Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 22
- Thank you received: 0
1 year 1 month ago - 1 year 1 month ago #1
by Stéphan
Franch formatted date in Smart Text was created by Stéphan
Hi NS Pro team 
I have put the smart text "{include:articlepubdate}article_id{/include}" in my newsletter, but I get then the date in english.
I need it in french.
In Advanced Options, field "PHP Locale" I put :
But it does not change anything.
Any advice ?
BTW? Nothing to do with above, but ...
when I use the smart text {date} i get the date in this format : 2025-04-09
Is there any way to modify this and get something like d F Y format ? Thanks in advance...
I have put the smart text "{include:articlepubdate}article_id{/include}" in my newsletter, but I get then the date in english.
I need it in french.
In Advanced Options, field "PHP Locale" I put :
Code:
setlocale(LC_TIME, 'fr_FR);
Any advice ?
BTW? Nothing to do with above, but ...
when I use the smart text {date} i get the date in this format : 2025-04-09
Is there any way to modify this and get something like d F Y format ? Thanks in advance...
Last edit: 1 year 1 month ago by Stéphan.
Please Log in or Create an account to join the conversation.
- Christopher Mavros
-
- Offline
- Administrator
-
1 year 1 month ago #2
by Christopher Mavros
Christopher Mavros
me@mavxr.com
If you like our extensions, please rate us on the JED!
Replied by Christopher Mavros on topic Franch formatted date in Smart Text
Hello Stéphan and thank you for posting.
In the PHP Locale option, please write fr_FR. NS Pro calls the setlocale function when necessary.
To change the date format of the {date} smart text, you may create a language override of the following key:
DATE_FORMAT_LC4
Its default value is Y-m-d, but if you want something like 16/04/2025, you can write d/m/Y.
Let me know if that helps.
Thanks again.
In the PHP Locale option, please write fr_FR. NS Pro calls the setlocale function when necessary.
To change the date format of the {date} smart text, you may create a language override of the following key:
DATE_FORMAT_LC4
Its default value is Y-m-d, but if you want something like 16/04/2025, you can write d/m/Y.
Let me know if that helps.
Thanks again.
Christopher Mavros
me@mavxr.com
If you like our extensions, please rate us on the JED!
Please Log in or Create an account to join the conversation.
- Stéphan
-
Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 22
- Thank you received: 0
1 year 1 month ago #3
by Stéphan
Replied by Stéphan on topic French formatted date in Smart Text
Hi Christofer, thank you very much for your answer...
I have tried to modify DATE_FORMAT_LC4 to j F Y but the date is still Y-m-j for my {date} smart text.
And I have also set the Set Local Parameter to fr_FR (and have also tried with "fr-FR") but both keep date in english in the newsletter.
As I'm working on my local MAMP, I will wait until I instal this site on public link. So I will be able to give you an access so you will have a deeper sight ?
SO don't close this ticket too quick
I have tried to modify DATE_FORMAT_LC4 to j F Y but the date is still Y-m-j for my {date} smart text.
And I have also set the Set Local Parameter to fr_FR (and have also tried with "fr-FR") but both keep date in english in the newsletter.
As I'm working on my local MAMP, I will wait until I instal this site on public link. So I will be able to give you an access so you will have a deeper sight ?
SO don't close this ticket too quick
Please Log in or Create an account to join the conversation.
- Christopher Mavros
-
- Offline
- Administrator
-
1 year 1 month ago - 1 year 1 month ago #4
by Christopher Mavros
Christopher Mavros
me@mavxr.com
If you like our extensions, please rate us on the JED!
Replied by Christopher Mavros on topic French formatted date in Smart Text
Did you modify DATE_FORMAT_LC4 for the site or also for the administrator?
Christopher Mavros
me@mavxr.com
If you like our extensions, please rate us on the JED!
Last edit: 1 year 1 month ago by Christopher Mavros.
Please Log in or Create an account to join the conversation.
- Stéphan
-
Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 22
- Thank you received: 0
1 year 1 month ago #5
by Stéphan
Replied by Stéphan on topic French formatted date in Smart Text
I have choosen "Both" when creating the langage overrides (so Admin AND Site)
Please Log in or Create an account to join the conversation.
- Christopher Mavros
-
- Offline
- Administrator
-
1 year 1 week ago #6
by Christopher Mavros
Christopher Mavros
me@mavxr.com
If you like our extensions, please rate us on the JED!
Replied by Christopher Mavros on topic French formatted date in Smart Text
Hello Stéphan.
It just occurred to me to ask: Have you got more than one languages installed on this website?
If yes, perhaps you need to add the override for the English language as well, because the scheduled task may not load the French overrides.
Can you please try and let me know?
It just occurred to me to ask: Have you got more than one languages installed on this website?
If yes, perhaps you need to add the override for the English language as well, because the scheduled task may not load the French overrides.
Can you please try and let me know?
Christopher Mavros
me@mavxr.com
If you like our extensions, please rate us on the JED!
Please Log in or Create an account to join the conversation.
Moderators: Christopher Mavros