If you are implementing Language Switcher in a single wordpress installation this step by step guide is for you.
Single website implementation is recommend for small website or when you only need to translate the content section but you keep the same global settings.
Let’s first do the global setup
> Go to yourwebiste.net/wp-admin/admin.php?page=language-switcher
> Make sure you have checked English and your second language then save.
> After that move to the Tab called “Settings” and check Post and Page in the post types.
You can come back to the bellow section “Default URLs” once you have created your home pages for both languages.
Create a translated page
> From the dashboard add a new Page and put your translated content with the shortcode [language-switcher] at the beginning of the text.
> Select the language of this page in the sidebar and copy/paste the url of the english version in the english url section.
> Save your page and check the preview. You should see a language selector at the beginning of the content with the english url.
> Now edit the english page, mark it as english, copy/paste the url of the translated page in the according section and add [language-switcher] at start of the text.
> Save and check that your english page has the Icelandic url in the dropdown.
> If these pages are the main pages then go back to Languages > settings > Default URLs and use them as default urls accordingly.
You are all set. If you use a page builder to render your pages then you might want to add the switcher shortcode somewhere in your footer or in a widget section where it can be visible in every pages. Alternatively you can add the languages in the Navigation Menu or use the PHP code in your theme.
This topic was modified 1 year, 3 months ago by Rafasashi.