• Resolved galderna

    (@galderna)


    WP Last Modified Info plugin works great for a monolingual site. Now I’m not being able to make it work for a multilingual site. I would appreciate any hint in order to translate the character strings and dates properly via CSS for the next HTML code:

    <span class=”page-last-modified”>Last Update on <time class=”page-last-modified-td”>February 8, 2019</time> by <span class=”page-modified-author”>Author name</span></span>

    Thank you very much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Sayan Datta

    (@infosatech)

    Hi,

    I would appreciate any hint in order to translate the character strings and dates properly via CSS for the next HTML code:

    I can not understand what you want to say. Please explain the problem briefly.

    Thanks!

    Thread Starter galderna

    (@galderna)

    Hi, Sayan:

    Thank you very much for answering. Sorry for my lack of precision.

    My problem is this: Let’s suppose the following settings for Post or Page Options:

    Custom Message to Display on Posts: Last Update on
    Date Format: F j, Y
    Separator: by
    Select (Author name): John Smith

    The HTML code generated by the WP Last Modified Info plugin is like this:

    <span class=”page-last-modified”>Last Update on <time class=”page-last-modified-td”>February 8, 2019</time> by <span class=”page-modified-author”>John Smith</span></span>

    So what it reads is: “Last Update on February 8, 2019 by John Smith”. Which is OK for an English site.

    Now, when I switch the site language to, let’s say, Italian, what it reads now is:

    “Last Update on febbraio 8, 2019 by John Smith”.

    Instead of: “Ultimo aggiornamento l’8 febbraio 2019 per John Smith”.

    That is, the plugin just mixes the English strings (Last Update on), the date format (F j, Y) and the separator (by) and the Italian month name (febbraio).

    The Italian settings should be:

    Custom Message to Display on Posts: Ultimo aggiornamento l’
    Date Format: j F Y
    Separator: per

    But the plugin assumes one language only and I just can get the both of them.

    Then I tried with the following settings:

    Custom Message to Display on Posts: <span class=”page-last-modified-en”>Last Update on</span><span class=”page-last-modified-it”>Ultimo aggiornamento l'</span>

    Separator: <span class=”page-last-modified-en”>by</span><span class=”page-last-modified-it”>per</span>

    My hope was that the plugin would recognize the HTML. Then I would be able to style the sentence via CSS (display: none) depending on the language of the page/post. Unfortunately, the plugin takes the whole contents as plain text.

    As for the Date Format, I just have no clue about how to deal with it. The “page-last-modified-td” class is not also of much help in this case.

    I’m working with Polylang plugin which does recognize the different Date Formats for all the languages I’m using:

    English: F j, Y
    Italian: j F Y
    German: j. F Y
    Spanish: j \d\e\ F \d\e\ Y

    But the WP Last Modified Info plugin just uses the Date Format specified within its own settings…

    Hope this helped to better describe the issue. Thanks a lot for your assistance. Best.

    Plugin Author Sayan Datta

    (@infosatech)

    Hi @galderna

    Please update this plugin to v1.4.8 and try it again.

    Thanks!

    Thread Starter galderna

    (@galderna)

    Thank you very much for the update, Sayan. Now I can insert HTML tags in the fields.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Multilingual Site’ is closed to new replies.