EDITS.WS

Tag: wordpress multilingual plugin

  • How to Easily Translate Your WordPress with TranslatePress

    Do you want to translate your website into another language?

    By default, WordPress does not offer an easy way to manage multilingual content. However, you can easily translate your WordPress website by using plugins.

    In this article, we’ll show you how to easily translate your WordPress website with TranslatePress.

    How to translate your WordPress with TranslatePress

    Why Use TranslatePress for Translating a WordPress Website?

    The best part about WordPress is that it can be used in any language. Most WordPress themes and plugins can also be used and translated into any language as well.

    If your business website has a multilingual audience, then it can be super beneficial to translate your content.

    You can rely on machine translations like Google Translate, but these translations are not good and sometimes can be quite misleading.

    On the other hand, if you’re using a multilingual WordPress plugin, then you need to create multiple posts which require switching back and forth between different languages.

    With the TranslatePress plugin, you can translate your website and content using a live editor and won’t need to create multiple posts for the same content.

    You can instantly switch languages from the live editor and can also translate themes and plugins using TranslatePress.

    Having said that, let’s see how you can easily translate your WordPress website with TranslatePress.

    Step 1: Install TranslatePress in WordPress

    The first thing you need to do is install and activate the TranslatePress plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

    Upon activation, head over to the Settings » TranslatePress page from the WordPress admin dashboard to configure your plugin settings.

    From here, you need to switch to the ‘General’ tab.

    Now, you first need to choose the default language of your website from the dropdown menu beside the ‘Default Language’ option.

    This is the language your WordPress is already downloaded in.

    Choose a default language in TranslatePress

    After that, you need to choose the language that you want to translate your site into.

    Simply head over to the ‘All Languages’ section, and choose a language you want to translate your website into from the dropdown menu below the ‘Language’ option.

    After that, you need to click the ‘Add’ button.

    Choose a translation language

    Now scroll down to the ‘Native Language Name’ setting on the page.

    Here, you need to select whether you want to display language names in their own language or in English. You can choose ‘Yes’ or ‘No’ accordingly.

    The next option is to choose if you want to display the default language name in the URL as a subdirectory. For example, http://example.com/en/.

    We recommend leaving this setting as it is because it is better for search engine optimization.

    After that, head over to the ‘Force language in custom links’ setting.

    The default option for it is ‘Yes’ which will allow the plugin to change custom links for translated languages, making the URLs more SEO-friendly.

    Configure other General settings

    In the next option, you can choose if you want to use Google Translate for automatic translations.

    The default choice is ‘No’, but you can change that if you would like to use Google Translate.

    All you would need to do is provide a Google Translate API key in the next option. You will find a link under the option which will show you instructions on how to get one.

    Provide Google Translate API if you want to activate it

    Finally, you will come to the options on how you want to display the language switcher on your website. TranslatePress provides you with three choices.

    You can use a shortcode, add a switcher to your navigation menu, or display a floating menu. We will show you how to add the language switcher to your website later in this article.

    Now, simply go ahead and click on the ‘Save Changes’ button to store your settings.

    Step 2: Translating Your Website Content

    To translate your website, you can either click the ‘Translate Site’ tab on the plugin’s settings page or the ‘Translate Site’ button in your WordPress admin bar.

    This will open the live translation editor in a new browser tab.

    Click Translate Site button

    Now, you need to simply click the blue translate icon present next to any text on your website that you want to translate.

    After that, TranslatePress will automatically load the chosen text in the left column of the translation editor.

    Translate website

    Once the text is loaded in the column, simply add its transition in the box below and then click the ‘Save Translation’ button at the top to store your changes.

    This way, you can translate all the content on any page of your site including navigation menus, buttons, sidebar, widgets, meta-text, and more.

    With TranslatePress, you can also instantly start translating any page or post on your site when logged in.

    All you would need to do is click on the ‘Translate Page’ button on the top to open up the live editor.

    Directly translate page

    Another benefit of this plugin is that you only need to translate a specific string once.

    Once you have translated a string, the plugin will automatically translate it for you in other places.

    Step 3: Adding Language Switcher to Your Website

    After translating your site, you will need to add a language switcher to your website.

    A language switcher allows users to select a language when they visit your website. It usually displays the flag of each country to indicate languages available on your site.

    TranslatePress allows you to add a language switcher by using a shortcode, as a navigation menu item, or as a floating banner.

    The language switcher can be displayed as flags, language names, or both.

    Adding language switcher in WordPress using shortcode

    If you want to add a language switcher in WordPress using shortcode, then head over to the Settings » TranslatePress page from the admin dashboard.

    Once you’re on the ‘Settings’ page, scroll down on the ‘General’ tab and then copy the [language-switcher] shortcode in the ‘Language Switcher’ section.

    Copy shortcode for the language switcher

    You can now paste this shortcode on any page, post, or sidebar widget where you want to display the language switcher.

    This is how the language switcher looked on our demo site.

    Shortcode language switcher

    Adding a language switcher to your WordPress navigation menu

    If you want to add a language switcher as a navigation menu item, then go to the Appearance » Menus page from the dashboard.

    Note: If you are using a block-based theme with a full site editor, then this method won’t work for you.

    From here, you need to click on the ‘Language Switcher’ tab in the ‘Add Menu Items’ section on the left corner of the screen.

    Once the tab expands, simply check the languages that you want to display in the language switcher.

    After that, click the ‘Add Menu’ button to add the language switcher as a menu item.

    Add language switcher in navigation menu

    Finally, don’t forget to click on the ‘Save Menu’ button to store your changes.

    You will now see a language switcher added to your WordPress navigation menu.

    This is how it looked on our test site.

    Language switcher added in nav menu

    Adding a floating language switcher

    If you want to add a floating language switcher, then you simply need to head over to the Settings » TranslatePress page from the admin dashboard.

    First, you need to scroll down to the ‘Language Switcher’ section in the ‘General’ tab.

    From here, make sure to check the box next to the ‘Floating language selection’ option.

    You can also switch the position of the floating language switcher from the dropdown menu on the right corner of the screen.

    Add a floating language switcher

    After that, don’t forget to click on the save changes button to store your settings.

    You can now visit your website to see the floating language switcher at the bottom of every page on your website.

    Add floating switcher

    We hope this article helped you learn how to translate your WordPress site with TranslatePress. You may also want to see our article on how to create a multilingual sitemap in WordPress and our list of the best WordPress plugins for business websites.

    If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

    The post How to Easily Translate Your WordPress with TranslatePress first appeared on WPBeginner.

  • How to Add Multilingual Search in WordPress (2 Ways)

    Do you want to add a multilingual search in WordPress?

    If you have a multilingual WordPress site, then adding a multilingual search feature can help users find information more quickly by searching in their own language.

    In this article, we’ll show you how to easily add multilingual search in WordPress and delight your users with a better user experience.

    How to add multilingual search in WordPress

    Why Should You Add Multilingual Search in WordPress?

    Often users have trouble finding information on multilingual websites because either there is no search feature that they can use, or the search feature shows them content in the wrong language.

    Adding a multilingual search feature helps users easily find the content they are looking for. This improves user experience which means users will stay longer on your website.

    Research shows that engaged users are more likely to convert, subscribe, or make a buying decision.

    That being said, let’s take a look at how to easily add a multilingual search in WordPress without breaking your website or writing any code.

    Method 1: Adding Multilingual Search Using TranslatePress

    If you haven’t made your multilingual website yet, or already using TranslatePress, then this method is for you.

    TranslatePress is the best WordPress translation plugin on the market. It allows you to easily create a multilingual website using a live editor for quick and easier translation.

    It works out of the box and allows default WordPress search to display multilingual results.

    The disadvantage of this method is that it uses the default WordPress feature which is not very good at fetching the right results.

    If you haven’t used TranslatePress before or need help, then see our tutorial on how to easily create a multilingual WordPress website.

    Note: Keep in mind that the free version of TranslatePress only allows you to translate your website into one other language. So if you want to add multilingual search in WordPress for more than two languages, then you’d need to buy the TranslatePress Premium version.

    Once you have translated some content on your WordPress website. It is time to add the search form.

    Add a Search Block to your WordPress Site

    WordPress comes with a built-in search block that you can add anywhere on your website.

    If you’re using a block-based theme like Ultra, then you’ll be using the full site editor to add the search block.

    Simply visit the Appearance » Editor page from the WordPress dashboard.

    This will launch the full site editor which looks a lot like the block editor you use for writing posts and pages.

    Now, click on the add block button (+) to add the Search block.

    Adding search block in site editor

    You can move the search block up and down to display it anywhere on the page.

    Search block also comes with a few style options that you can choose from the block toolbar or settings.

    Search block settings

    Once you are finished, don’t forget to click on the Save button to save your changes.

    You can now visit your website to see the search form in action.

    Search form preview

    On the other hand, if you’re using a theme that does not support the full-site editor, then you can add a search form as a widget.

    Simply go to the Appearance » Widgets page from the WordPress admin dashboard.

    Here, click the Add widget block button (+) and add the Search block to your widget area.

    Search widget

    Once the ‘Widget Block Menu’ opens up, locate the ‘Search’ block and add it to your WordPress sidebar.

    Don’t forget to click the ‘Update’ button at the top to save your changes.

    Once you’ve saved the changes, visit your site and see the search box in action.

    Website preview

    Method 2: Adding Multilingual Search Using SearchWP (Recommended)

    The default WordPress search feature used by TranslatePress is not very good. It is quite basic and only looks for search terms in certain places.

    This is where SearchWP comes in.

    It is the best WordPress search plugin on the market and allows you to easily replace the default WordPress search with a more powerful search feature.

    SearchWP

    SearchWP automatically builds a search index and matches search keywords in content, title, categories, tags, shortcodes, documents, products, and more.

    Plus, it automatically replaces the default search form upon activation so you don’t need to replace it if you were already using it on your site.

    That being said, let’s take a look at how to easily add a better multilingual search to your WordPress site.

    First, you need to install and activate the SearchWP plugin. For more information, see our guide on how to install a WordPress plugin.

    After that, go to the SearchWP » Settings page and then click on the ‘License’ menu option to enter your license key.

    You can get the license key from your ‘SearchWP Accounts’ page. Simply copy the license key from there.

    After that, paste it into the ‘License Key’ field and then click on the Activate button.

    SearcWP license

    Now, you are ready to create your first custom search engine.

    Simply go to the SearchWP » Settings page from the dashboard.

    From here, you will see SearchWP’s first default search engine for you. It is pre-configured to work for most websites including multilingual websites.

    You’ll see all your post types with different attributes. Next to each attribute there will be a slide that you can move to assign weight for that attribute.

    SearchWP settings

    You can also click on the Add/Remove Attributes button to include more areas in the search.

    For instance, you can add custom fields and taxonomies to the attributes as well.

    Add more attributes to search

    If you are unsure about a setting, you can leave it as it is. The default options would work for more use cases.

    Finally, click on the Save Engines button to store your settings.

    SearchWP will now start building your search index in the background.

    Now, all you need to do is add the search form to your site.

    Add a Search Block to your WordPress Site

    SearchWP replaces the built-in search feature, which means you can use the default WordPress search form and it would still use SearchWP to show the results.

    If you haven’t already added a search form to your website, then here is how you would add it.

    If you’re using a block-based theme, then you’ll be adding a search block using a full-site editor.

    Simply go to the Appearance » Editor page from the admin dashboard.

    On the edit screen, click on the add block button (+) at the top and add the search block.

    You can move the search block to the area where you want to display the search form by moving it up or down.

    Adding search block in site editor

    Finally, don’t forget to click on the Save button to save your changes.

    If you’re using a theme that doesn’t support the full-site editor, then you’ll need to add a search widget to your website’s sidebar or widget-ready area.

    For that, head over to the Appearance » Widgets page from the dashboard.

    Now click on the add block button (+) at the top to open up the ‘Widget Block Menu’.

    From here, locate and add the Search widget to your preferred widget area.

    Search widget

    Don’t forget to click the ‘Update’ button at the top to save your changes.

    Next, simply visit your website and use your improved search box.

    Website preview

    For more information and detailed instructions, take a look at our guide on how to improve WordPress search using SearchWP.

    We hope this article helped you learn how to add multilingual search in WordPress. You may also want to check out our tutorial on how to fix WordPress search errors, and our article on how to create a multilingual sitemap in WordPress.

    If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

    The post How to Add Multilingual Search in WordPress (2 Ways) first appeared on WPBeginner.