• I was able to use the [days=””] string to change the name of the days of the week for my site (Japanese), but then this will not be able to display the month or date using the [day_format] shortcode. Is there any way to manually input the names of the months in another language to override this?
    Thanks for any help.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Design Extreme

    (@designextreme)

    @maley2307 Thank you for getting in touch about this matter.

    The days parameter will only allow you to set replacement words (really anything you like) for days of the week. It does not handle anything beyond this so introducing dates in any format will have it fall back to the local interpretation of dates – in your case this is Japanese.

    In the more recent version of this plugin, I ensured that proper language support is utilised wherever possible (using the WordPress function: wp_date()).

    Just before continuing, did you set the local language in the General WordPress Settings to Japanese?

    Do you have a URL that you can share to illustrate your current problem?

    Thread Starter maley2307

    (@maley2307)

    Sorry, I solved that problem but discovered a new one. I was able to have it show the day of the week and the month in Japanese,
    for example 金曜日、2月 12 (→Friday, February 12) but I can’t get it to show a trailing character that indicates 12日 (similar to 12th). I tried using [day_suffix=“日”] but this didn’t work. The full “date” should be “金曜日(,) 2月 12日”

    Also my business’ hours run past 24:00 (for example 7pm~2am the next day), but this does not seem to register as opening hours of the following day, and %if_open_now% returns an incorrect result after midnight.

    Plugin Author Design Extreme

    (@designextreme)

    Thanks @maley2307!

    Don’t use the day_suffix parameter as this refers more to : or :- and other similar purposes – it will always use the same character (and trim the same character if already exists within the text string).

    When setting the following Shortcode with parameter, does this not work as expected?

    [open day_format="full_date_month_first_nos"]

    Any format with “nos” included will add the local variant of 1st, 2nd, 3rd, 4th, … It can also be selected in the main settings.

    For opening after midnight with the replacement text, further development may be required here. I will add such data to my development website to extend its functionality and ensure post-midnight cases are handled properly.

    Plugin Author Design Extreme

    (@designextreme)

    @maley2307 For the second point – once midnight is past, it will look to the new and current day for its opening hours. A known issue here is to check the previous day first to see if any opening time exists after midnight.

    Thread Starter maley2307

    (@maley2307)

    The [open day_format=”full_date_month_first_comma_nos”] returns
    金曜日, 2月 12TH ←it remains TH, which is not recognized in Japanese.
    The general WordPress site language is set to Japanese and date format is a custom setting, Y年n月j日 .

    Plugin Author Design Extreme

    (@designextreme)

    @maley2307 I will need to find out a better solution for some languages – I thought the localized dates would show the correct suffix.

    Leave it with me and I’ll post an update here when I know more.

    Plugin Author Design Extreme

    (@designextreme)

    @maley2307 I still have this issue in mind for the next update. I will try to find a solution using WordPress best-practice with date formatting.

    I was able to use the [days=””] string to change the name of the days of the week for my site (Finnish), but I am not able to use anymore the [days=””] default (English) on my international site at the same time.

    Could it be possible to have opening hours and the name of the days of the week at the same page beside to each other in Finnish and other in English like below?

    P?iv?kohtaiset aukioloajat: (Finnish)
    Perjantai, 27 elokuun: 10.30 – 14.00
    Lauantai, 28 elokuun: Suljettu
    Sunnuntai, 29 elokuun: Suljettu
    Maanantai, 30 elokuun: 13.00 – 17.00

    Daily opening hours: (English)
    Friday, 27 August: 10.30am – 2pm
    Saturday, 28 August: Closed
    Sunday, 29 August: Closed
    Monday, 30 August: 1pm – 5pm

    • This reply was modified 3 years, 7 months ago by hantzku.
    Plugin Author Design Extreme

    (@designextreme)

    @hantzku I think this is a different issue to the post.

    You are right about the dates: once set to a language, it will remain so throughout the page. Using the days parameter works best with the day names (and not a full date with the month).

    I will look into adding new functionality to support that will allow for a switch of languages and being able to set this as a parameter.

    Just to check: the days parameter doesn’t work for you with the day names within the same page? This should be overwriting any existing text for the dates.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Change month and date language’ is closed to new replies.