*

morfik

  • ****
  • 169 posts
Re: Issues with custom fields as requeired ones
« Reply #15 on: February 13, 2023, 10:14:52 AM »
https://stackoverflow.com/questions/6910912/change-the-language-for-date-in-php

Code: [Select]
setlocale(LC_TIME, array('da_DA.UTF-8','da_DA@euro','da_DA','danish'));
echo strftime("%A"); // outputs 'tirsdag'

Where should I put this?  :)

*

MB Themes

Re: Issues with custom fields as requeired ones
« Reply #16 on: February 13, 2023, 10:17:31 AM »
Should be ok in config.php.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

morfik

  • ****
  • 169 posts
Re: Issues with custom fields as requeired ones
« Reply #17 on: February 13, 2023, 10:31:42 AM »
No it still doesn't work.

I tested what will be printed without this setlocale... and it said Monday, when I added:

Code: [Select]
setlocale(LC_TIME, array('pl_PL.UTF-8','pl_PL@zloty','pl_PL','polish'));
It changed to PoniedziaƂek, which is a Polish translation of Monday, but the name of the month still is in English in osclass custom forms and and in dashboard (except for aforementioned cron).


*

morfik

  • ****
  • 169 posts
Re: Issues with custom fields as requeired ones
« Reply #18 on: February 13, 2023, 10:39:38 AM »
When I used:

Quote
echo strftime("%A %e %B %Y");


it prints the date in English

When changed to:

Code: [Select]
setlocale(LC_TIME, array('pl_PL.UTF-8','pl_PL@zloty','pl_PL','polish'));
echo strftime("%A %e %B %Y");

This prints the whole date in Polish, but only for echo. The custom fields date and osclass settings in dashboard are still in English.

*

MB Themes

Re: Issues with custom fields as requeired ones
« Reply #19 on: February 13, 2023, 11:05:31 AM »
You can define custom date format in Settings > General.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

morfik

  • ****
  • 169 posts
Re: Issues with custom fields as requeired ones
« Reply #20 on: February 13, 2023, 11:08:45 AM »
You can define custom date format in Settings > General.

I know I can, it's not about the format -- it's about its language. Still the theme uses proper translation wherever the date is printed. But for custom fields it shows the calendar frame with English names. And this is the problem. It looks like this it's hardcoded somewhere and can't be changed.

*

MB Themes

Re: Issues with custom fields as requeired ones
« Reply #21 on: February 13, 2023, 12:59:47 PM »
Ok you mean calendar, its jquery UI.
It cannot be configured from Osclass side, chrck their docs.
Next time please create new thread for different issues unrelated to original one.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

morfik

  • ****
  • 169 posts
Re: Issues with custom fields as requeired ones
« Reply #22 on: February 13, 2023, 01:03:21 PM »
Ok you mean calendar, its jquery UI.
It cannot be configured from Osclass side, chrck their docs.
Next time please create new thread for different issues unrelated to original one.

I thought it's related to custom fields, and that's why I mentioned it here.

So the question is: how good a calendar entry is when it's in foreign language?