{"id":17726232,"date":"2024-05-01T13:50:16","date_gmt":"2024-05-01T13:50:16","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/language-switch-change-way-language-is-written\/"},"modified":"2024-05-01T13:53:22","modified_gmt":"2024-05-01T13:53:22","slug":"language-switch-change-way-language-is-written","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/language-switch-change-way-language-is-written\/","title":{"rendered":"Language switcher: change the way a language-choice is written?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In the language switcher (either in the primary menu or in the shortcode) the languages are shown in very specific ways:<br \/>&#8211; the short name version is always in capitals, e.g.: <strong>EN<\/strong> (for English (UK))<br \/>&#8211; the long name version always contains the country indication when applicable, e.g.: English <strong>(UK)<\/strong>.<br \/><br \/>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: &#8216;<strong>En<\/strong>&#8216; instead of &#8216;EN&#8217;).<br \/><br \/>Similarly: adding the &#8216;UK&#8217; to the long version in English is unnecessary most of the times and looks redundant in the menu. Just &#8216;English&#8217; would be sufficient.<br \/><br \/>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?<br \/><br \/>I looked through the documentation, but couldn&#8217;t find any information about these matters.<br \/>Sorry if I overlooked something!<br \/><br \/>Cheers!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"template":"","class_list":["post-17726232","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/17726232","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":3,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/17726232\/revisions"}],"predecessor-version":[{"id":17726237,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/17726232\/revisions\/17726237"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=17726232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}