O
O
ololoshka12020-06-26 12:54:49
WordPress
ololoshka1, 2020-06-26 12:54:49

Does the_time() itself translate to the desired language in WordPress?

With the function <?php the_time(); ?> displayed the publication date of the entry, show the month in Russian, but I need it in English, or does it itself adapt to the user's PC language?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan Hasanli, 2020-06-26
@azerphoenix

Hello!
Let's look at this function - https://wp-kama.ru/function/the_time
As you can see from the Russian documentation, this function can take arguments to format the date according to localization. Please note that the English date and time display system is different from the Russian one. For example, in English It is customary to divide the time into am / pm
Next, open the site of. documentation and see the following:
https://wordpress.org/support/article/formatting-d...
We read the chapter on date and time localization date_i18n()
If I understand you correctly, then this is what you need

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question