• Resolved elsnare

    (@elsnare)


    Afther 2 hours of fighting I could not get this to work.

    In singe post I’m pulling the date by:
    the_date('j, F, Y');

    It output’s the formatted date for the appropriate language – this works fine.

    The problem:
    Some characters in the date are replaced by ascii “?” symbols.
    For example: b?ezen as of March. It affect only foreign characters with umlauts and such.

    What I tried:

    • Changing date emulation in the settings.
    • Changing date output
    • Changing single.php file encoding
    • Checked .po and .mo files in the language directory

    I’m out of ideas ??

    https://www.ads-software.com/plugins/qtranslate-x/

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author Gunu

    (@grafcom)

    @elsnare,

    have you tried this?

    Settings – Languages – Advanced Settings – Date / Time Conversion

    Use strftime instead of date and replace formats with the predefined formats for each language.

    Thread Starter elsnare

    (@elsnare)

    Sorry for the double post – the forums had a hiccup.

    Yes, I tested every setting in Advanced Setting and even changed the date display code in the template.

    At first it did not translate the date at all (only displayed in English regardless of the language). After the above I got the results but with the mentioned “?” symbols.

    The date format is accurate and the translation works fine. Just the output on the umlaut characters is messed up.

    Also it’s not font-related, tried changing the styles to typical arial, times new roman etc – the symbol persists.

    A true mystery for me ??

    Plugin Author Gunu

    (@grafcom)

    @elsnare,

    can you show me an example?

    What language and what settings you use, so I can see if I can reproduce it.

    Thread Starter elsnare

    (@elsnare)

    You can check it here: Link
    Changing the language to Czech causes the bug on the date.

    As of now “Use emulated date function.” is selected.
    Time format and date format fields are empty for the language.

    Plugin Author Gunu

    (@grafcom)

    ??? See your link… are you sure?

    Thread Starter elsnare

    (@elsnare)

    Link fixed, works now – take a look.

    Plugin Author Gunu

    (@grafcom)

    I will look. But you also have this problem only with WP in Czech?

    Thread Starter elsnare

    (@elsnare)

    Well other languages don’t use umlauts or special characters so it’s hard to tell at this moment if it affects other languages.

    I found the exact same problem on the old Qtranslate support forum – but no solution was given.

    It’s not ground breaking – I can always switch to numeric output, I’m just curious what’s causing it.

    Plugin Author Gunu

    (@grafcom)

    I’m just curious what’s causing it.

    me to….

    But have you tried with qTranslate deactivated and only WorPress in Czech?

    Thread Starter elsnare

    (@elsnare)

    Well I think the native language support would work just fine ??
    The .mo and .po files have the proper symbols in those words, so something is going wrong with the output of the plugin.

    I’ll try some things later today or tomorrow, might stumble upon a solution.

    Plugin Author Gunu

    (@grafcom)

    Well I think the native language support would work just fine ??

    But are you sure, tested it?

    Plugin Author Gunu

    (@grafcom)

    BTW – wp_list_pages problem
    do you have this solved?

    Thread Starter elsnare

    (@elsnare)

    But are you sure, tested it?

    Tested – no, but there is no extra code/filters that affect the date outside the plugin. It’s a regular wp post with regular date output.

    BTW – wp_list_pages problem –
    do you have this solved?

    Nope. wp_list_pages does not work with the “hide content” checkbox enabled. I had to rewrite the code using the get_pages(); function.

    The pages sho wup now, their titles are translated but they are not hidden when there is no content for a given language. Still better than no pages at all ??

    Plugin Author Gunu

    (@grafcom)

    @elsnare,

    what is the code for that Czech language?

    In Settings – Languages then Choose edit in Languages and look at Locale = (en_US for English)

    Plugin Author Gunu

    (@grafcom)

    @elsnare,

    I did here a test. First Czech was not in my List of Configured Languages from qTranslate X (?)

    There is a language file cs_CZ.po in the language folder of qTranslate x but not all is translated (if you feel called :-))

    I did Add Language – Tsjechi?

    Language Code = cs
    Flag = cs.png
    Name = Tsjechi? (my choice)
    Locale = cs_CZ
    Date Format = I left this blank
    Time Format = I left this blank
    Not Available Message = Not Available (my choice)
    then Save changes

    I activated the Czech language – Set my Date / Time Conversion to Use strftime instead of date.

    Checked the website and…. this was the result – b?ezen
    Now I hope this forum shows it good.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Date missing characters’ is closed to new replies.