![]() ![]() Menu language switcher on the front-end Customizing menu language switchers Specifically for menu language switchers, WPML version 3.6 added a new CSS class – wpml-ls-menu-item. This way, your theme renders the language switcher just like other menu items.īasically, this allows the language switcher to look better on your site, taking on the look of your theme’s CSS rules. Instead, it injects the “language switcher” elements into the menu structure. HTML structure of menu language switchers Since version 3.6, WPML does not render language switchers with its own HTML. However, it does show you the effect of the different options, color settings, order, and content. ![]() The preview is “schematic.” It does not load the front-end CSS (it is not a good idea to load in the WordPress admin), so the actual language switcher will be styled differently. Settings for menu language switcher Live preview showing language switcher options As you change the settings of the language switcher, the preview updates. This allows you full and independent control over what it includes and how it looks.įor example, the following image displays a dialog box with settings for the menu language switcher. Full control over each language switcher Each language switcher type has its own settings. Separate sections for each type of a language switcherEach section has its own “add” button (to add another language switcher of that kind), a “pencil” icon to edit the existing switcher, and a “trash” icon. The Languages page shows a working preview for the different language switchers active on your site, as displayed in the following image. Options selected for different kinds of language switchers are applied to each switcher, respectively. Separate sections for different kinds of language switchers Each kind of a language switcher has its own separate section. Switch the language – the URL will end only with ?bar=10&foo=100. ![]() In the front-end, open the “Hello world” post and add this at the end of the URL: ?bar=10&foo=100&lost=1000 (notice that we added the two arguments + the lost one).Suppose you add the following arguments: bar, foo. ![]() “Preserve URL arguments” dialog boxLet’s consider the following example of using this feature: The arguments you want to be preserved should be added here as a comma-separated list. URL arguments might be needed by some plugins and you may want to keep them when switching languages – that’s the purpose of this feature. The main Language switcher options section Settings for preserving URL arguments Language switcher options section features the Preserve URL arguments option. Please note that these options are applied to all language switchers you add. Global language switcher options The first section related to language switchers is the one for the global settings, like the order of the languages. To add and customize language switchers, go to WPML -> Languages in the WordPress dashboard. Read our guide on fixing styling issues for language switchers. If the language switcher is not displaying right with your theme, there could be a CSS conflict. Language switchers added using WPML look good on most themes. You can also use it to show links above or below your posts, offering them in other languages. WPML lets you add a language switcher in different ways: in a menu, as a widget, or in the site’s footer. ووردبريس Wordpress اضافة تعريب المواقع WPML شرح Language Switcher OptionsĪ language switcher allows visitors to select the language in which they want to read your content. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |