Skip Navigation

[Resolved] date picker post apperance is not displaying in the wordpress language

This support ticket is created 4 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 4 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#2070513
Captura de pantalla 2021-05-27 a las 21.56.05.png

Tell us what you are trying to do?
I'm creating a event list, the date is displaying in englishm but the wordpress language is set on catalan, what can I do for displaying in catalan the months and the days?

Is there any documentation that you are following?
In the forum, I've tryied all the answers and ddidnt work

Is there a similar example that we can see?

What is the link to your site?

hidden link

#2070857

Hello,

I assume we are talking about a custom date field created with Toolset Types plugin.
How do you display above custom date field? with Toolset Single Field block?
https://toolset.com/block-item/single-field/

I have tried it in my localhost with a "Català" WP installation + the latest version of Toolset plugins, it works fine, for example today value, it outputs:
28 de maig de 2021

Please provide detail steps to reproduce the same problem.

#2071015

Hello Luo,

I'm using the repeater Oxygen,
I'm adding a code block;

<?php
// Get the post ID
$post_id = get_the_ID();
$toolset_field = "wpcf-data";
// Get the Toolset date
$timestamp = get_post_meta( $post_id, $toolset_field, true );
// Convert string to int
$timestamp_to_int = (int)$timestamp;

// Data catala

// Data que agafa del custom field "wpcf-data"
$date = (date('j F', $timestamp_to_int));

?>

<div class="my-date"><?php echo $date;?></div>

#2072153

You can try with built-in function types_render_field() of Toolset Types plugin, for example, replace this line from:
<div class="my-date"><?php echo $date;?></div>

To:
<div class="my-date"><?php echo types_render_field("data", array("format" => "j F"));?></div>

More help:
https://toolset.com/documentation/customizing-sites-using-php/functions/#date