• Resolved raoulunger

    (@raoulunger)


    In the language switcher (either in the primary menu or in the shortcode) the languages are shown in very specific ways:
    – the short name version is always in capitals, e.g.: EN (for English (UK))
    – the long name version always contains the country indication when applicable, e.g.: English (UK).

    This poses some stylistic problems. When the rest of the primary menu is not in capitals, the all-caps version of the language-item looks very out of style. It would much better to write the language in under-cast as well (so: ‘En‘ instead of ‘EN’).

    Similarly: adding the ‘UK’ to the long version in English is unnecessary most of the times and looks redundant in the menu. Just ‘English’ would be sufficient.

    My question therefor is: can we alter the way languages are referred to in the language switchers? Perhaps there is some php code that we can add to alter certain strings?

    I looked through the documentation, but couldn’t find any information about these matters.
    Sorry if I overlooked something!

    Cheers!

    • This topic was modified 1 year, 11 months ago by raoulunger.
    • This topic was modified 1 year, 11 months ago by raoulunger.
    • This topic was modified 1 year, 11 months ago by raoulunger.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Alex

    (@alexcozmoslabs)

    Hi,

    You can alter the name of a language using the Custom Language section from TP Settings –> Advanced tab. We have documented this also: https://translatepress.com/docs/developers/change-language-name/.

    Best Regards,

    Thread Starter raoulunger

    (@raoulunger)

    HI, thank you for your answer. It does not cover my question completely though (also your documentation shows less field than the advanced tab does).

    I figured out that, in order to change the language switch in the wordpress primary menu, I have to change the ‘slug’ in the plugin’s settings (not on the advanced tab). So I changed it from ‘en’ to ‘english’. That works in the sense that ‘english’ now appears in the menu.

    What is not solved is that the word ‘English’, appears all capitalized, which I don’t want, as the rest of the menu is not capitalized either. I see in the HTML markup that the word is actually inserted in capitals by your software – which means I cannot undo it through css. It would be more logical if your plugin would insert the slug in undercast, and then capitalize it through css (which then can be undone).
    Is there a way to change this?

    Thanks

    Thread Starter raoulunger

    (@raoulunger)

    Ok, in the meantime I found out that if you choose ‘Full Language Names’ in settings -> Langugage Switcher, and then change the ‘native field’ in the advanced tab, the new name is shown as typed (not in all caps). So problem solved.

    However, in your documentation this ‘native field’ is never mentioned – so perhaps it would be good that revise that chapter a bit. I think the plugin may have changed since that chapter was written.

    Cheers

    Plugin Support Alex

    (@alexcozmoslabs)

    Thank you for your suggestion. Could you please specify were the “native field” should me mentioned in the documentation. You can attach the link directly or share ascreenshot.

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

The topic ‘Language switcher: change the way a language-choice is written?’ is closed to new replies.