• Resolved pvmatic

    (@pvmatic)


    This is great plugin, but I can not make it work for all 3 languages. It works for Serbian Latin and English and not for Russian. Do you have any clue what should I do?

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 27 total)
  • Plugin Author pepe

    (@pputzer)

    Hi @pvmatic, I assume you are talking about hyphenation? What exactly does not work for Russian (though you probably mean Serbian written in Cyrillic)? Do you have an example page I can look at?

    • This reply was modified 5 years, 1 month ago by pepe.
    Thread Starter pvmatic

    (@pvmatic)

    Hi @pepe, yes I mean on hyphenation, sorry I was not clear.

    In Serbian latin it works: https://nsseme.com/proizvodi/kukuruz/hibridi-za-proizvodnju-zrna/.
    In English it works: https://nsseme.com/en/products/corn/.
    I can not make it work in Russian: https://nsseme.com/ru/produktsiya/kukuruza/.

    I use Polylang and Avada.

    If I turn on “Enable support for using multiple languages on the same site.” option and set “Language for hyphenation rules:” to SerboCroatian (Latin) I have hyphenation on English and Russian anf not on Serbian Latin.

    I have tried so many times and I am stuck now.

    I hope you can help me to find some solution to continue to use this great plugin.

    Plugin Author pepe

    (@pputzer)

    Sorry?@pvmatic I didn’t get around to this. Can you post your language/locale codes (American English would be en_US for example)? It is likely that there’s a mismatch between what the automatic switcher expects and what Polylang provides.

    Thread Starter pvmatic

    (@pvmatic)

    English: en_GB
    Serbian latin: sr_RS
    Russian: ru_RU

    Hi @pepe,

    What I did notice is that hyphenation works even on Russian language pages, but only for latin words. So I guess you may be right about locale codes.

    I hope you can find some solution for this issue.

    Thank you in advance.

    Regards,
    Predrag

    Plugin Author pepe

    (@pputzer)

    Can you check if sr_RS actually uses the correct hyphenation patterns? I would assume it does not, unless that’s your set language in wp-Typography’s settings page. Is there any way to determine the script variant (Latin or Cyrillic) from your locale strings? If not, I think you’ll have to work with a filter to get the right one even if I improve the matching algorithm.

    As for why ru_RU is not working, that’s pretty strange. You are using UTF-8 as the encoding?

    Thread Starter pvmatic

    (@pvmatic)

    In wp-typography settings default laguage is set to Serbcroatan (latin), because there is no Serbian (latin), but Serbian (cyrilic) only. Language I use on website is Serbian-latin.

    Russan hyphenation is working but for some latin words only, and cyrilic words are not hyphenated (these latin words are on Latin language among words in Russian language.

    Thank you.

    Regards, Predrag

    Plugin Author pepe

    (@pputzer)

    @pvmatic I’m guessing that only the default settings are applied to all three languages (or at least to Serbian and Russian).

    Can you confirm that the Russian sub-site is encoded in UTF-8?

    Also, please post your hyphenation settings (minimum length etc.).

    Thread Starter pvmatic

    (@pvmatic)

    Serbocroatin (latin) works for Serbian-Latin and English. On pages on Russian language it works for latin words only.

    Russian website is on same domain as Serbian and English and there is no any additional settings.

    GELERAL SCOPE TAB
    Everything is checked.

    HYPHENATION TAB

    Checked:
    Enable hyphenation. (language is Sebocroatian (latin))
    Allow hyphenation of words that begin with a capital letter.
    Allow hyphenation of the components of hyphenated compound words.
    Remove hyphenation when copying to clipboard
    Add workaround for Safari hyphenation bug

    OTHER
    Do not hyphenate words with less than 4 letters.
    Keep at least 2 letters before hyphenation.
    Keep at least 2 letters after hyphenation.

    SPACE CONTROLS TAB
    Prevent widow is not checked.

    Plugin Author pepe

    (@pputzer)

    Thanks. Does the Russian sub-site use UTF-8 encoding?

    Thread Starter pvmatic

    (@pvmatic)

    There is only 1 config file for all languages:

    define(‘DB_CHARSET’, ‘utf8mb4’);
    define(‘DB_COLLATE’, ”);

    Plugin Author pepe

    (@pputzer)

    OK, that looks good. I’ll try to recreate the scenario.

    Thread Starter pvmatic

    (@pvmatic)

    Thank you so much.

    Plugin Author pepe

    (@pputzer)

    Hi @pvmatic, I’ve created a Polylang installation with sr_RS, en_US and ru_RU as locales and set the wp-Typography settings to what you have indicated above. I’ve also copied some example texts from each of your subsites.

    To my surprise, the Russian post got hyphenated where the same text is not hyphenated on your site. I don’t immediately see why. Can you please create a minimal test installation with just Polylang and a default theme? It should work as expected. Then you add plugins one by one (and configure them as on your true site) and check when things stop working.

    Somewhere, there must be a filter or something (because wp-Typography does do some de-widowing from the looks of it) disabling hyphenation. Maybe in a forgotten part of functions.php or an MU plugin?

    Thread Starter pvmatic

    (@pvmatic)

    Which is your default language?

    Is multilanguage support checked or not?

    I will try< to see what is going on.

    Thank you

    Plugin Author pepe

    (@pputzer)

    Default language has been set to Serbocroatian (Latin) and Multilingual Support was enabled of course.

Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘Hyphenation issue on 3 languagues website’ is closed to new replies.