What is hreflang – SEO for multilingual Websites

What is hreflang – SEO for multilingual Websites

What is hreflang – SEO for multilingual Websites
In this tutorial we explain the link attribute rel=」alternate」 hreflang=」x」. Moreover we focus on the relationship of hreflang, SEO and multilingual websites. Last but not least we show how to implement it with MultilingualPress.

Table of Contents

What is hreflang?Which impacts does hreflang have on SEO?How do I have to implement hreflang?How do I set up hreflang with MLP?How can I test whether hreflang is implemented correctly?
What is hreflang?
The link attribute rel=」alternate」 hreflang=」x」 is inserted into the website』s head. Due to that search engines understand they shall show the users』 preferred language. Moreover they learn that the website content is available in several languages.
Example:

The example displays that the current content is also available in the language version en-US on the page https://inpsyde.com/en/.
Which impacts does hreflang have on SEO?
On the one hand the link attribute tells a search engine that a website』s content is available in several languages. Thanks to that, the search engine can display the user』s preferred language. On the other hand the attribute prevents a punishment due to duplicate content, for example when there is the same content for several languages/regions.
Example:
Company A has a multilingual website with contents for Germany, Switzerland and France. The contents of the Swisse and German website are partly identic. As both languages are quite similar, there would be a duplicate content problem without hreflang. But with the link attribute the search engine recognizes that it』s content for different regions.
How do I have to implement hreflang?
In case you have a number of language versions of one URL, each version needs to have a rel=」alternate」 hreflang=」x」 link both for itself and the other language versions.
Example:
When you offer content in German, English, and French, the German version needs to have a rel=」alternate」 hreflang=」x」 link attribute for itself additional to the links for the English and French language versions. The English and French versions need to refer to the French, English, and German language versions as well.
How do I set up hreflang with MLP?
You need to connect the different languages for each website. As soon as you defined the translation relationships, MultilingualPress inserts the link attribute into the sites automatically.
Example of our own website https://multilingualpress.de:
hreflang attribute for language or region URL
How can I test whether hreflang is implemented correctly?
The website sistrix.com offers a hreflang validator.
Moreover the Google documentation offers further information.

How can I extend my MultilingualPress license?

How can I extend my MultilingualPress license?

How can I extend my MultilingualPress license?
This tutorial is part of our MultilingualPress 2 documentation. In case you are using the newer version 3, please switch to MultilingualPress 3.
If you have purchased MultilingualPress Premium Support on multilingualpress.org, you have to do nothing for the renewal of your license. A subscription applies so that your license will be automatically renewed and you do not have to worry about every year.
Of course you can cancel your subscription at any time in your account towards the end of the billing period.
An overview of your order and subscriptions can be find in your MultilingualPress account on the My Account page, each with a link to the detailed view.
If you have questions before you buy the licenses and subscriptions, please contact us via the contact form. After purchasing you are allowed to contact support.

MultilingualPress and WordPress 5.0 (Gutenberg)

MultilingualPress and WordPress 5.0 (Gutenberg)

MultilingualPress and WordPress 5.0 (Gutenberg)
We are almost there: on 27th of November WordPress will change its editor and it will not be a small change. In fact the new WordPress 5.0 will include Gutenberg in the core. If you are wondering what Gutenberg is, the answer is: a completely new way of writing and processing content in WordPress.

Table of Contents

The Gutenberg revolutionGutenberg ready!Is MultilingualPress Gutenberg ready?Is MultilingualPress version 2 Gutenberg ready?Is MultilingualPress version 3 Gutenberg ready?How to upgrade from version 2 to version 3?Get in touch!
1. The Gutenberg revolution
The Gutenberg editor is based on the concept of blocks: an elementary content unit through which it is possible to build your contents. Therefore, everything can be rethought as a composition of blocks of different types. Intriguing? If you want to know more, have a look here: Say Hello to the New Editor
If you cannot wait to start playing with it, you can also install Gutenberg separately: in fact currently it is available as a plugin, while in the new WordPress 5.0 it will be integrated in the core. Here is the link if you want to immediately test it: Gutenberg Plugin
Why do we talk about a revolution? Because Gutenberg has potential to go beyond WordPress. Gutenberg implies a new way of thinking and building content. An innovative change that could spread beyond the boundaries of WordPress if it shows to be a more efficient approach in editing content than the traditional one.
In this case we would be facing a significant change involving the technologies of the digital edition, and therefore the web in general. Are you ready?
2. Gutenberg ready!
It is also important to understand that all the software developed for the WordPress ecosystem, and therefore plugins and themes, will have to manage this change.
So, in some cases, to be Gutenberg compatible will require proper software updates for themes and/or plugins.
But what if my software is not Gutenberg ready, or if I just prefer to continue using the classic editor? Don』t worry: this will still be possible.
Let』s see it from the MultilingualPress point of view.
3. Is MultilingualPress Gutenberg ready?
Do you remember that MultilingualPress is available in two flavors? We have MultilingualPress version 2 and the new refactored and enhanced MultilingualPress version 3. Hence the question requires to be formulated in a more appropriate manner.
4. Is MultilingualPress version 2 Gutenberg ready?
Version 2 was not originally designed to work with Gutenberg. We know, it』s a pity.
But we set a proper workaround to allow you to continue your work without problems.
The issue is that MultilingualPress, to work correctly, needs the classic editor. So, to overcome the problem, we set the __block_editor_compatible_meta_box parameter to false, implementing the solution described here: Metabox in Gutenberg
In this way, installing MultilingualPress version 2, your WordPress will automatically use the classic editor.
At the time of writing this article, WordPress 5.0 has not been released yet. So, to test the workaround described in the above paragraph, we used the WordPress 5.0 beta, which is currently available. Unfortunately, we saw that for the beta version the workaround does not work. We expect that in the official 5.0 version it will work properly. But in the meantime we followed a second way to solve the problem: install the classic editor plugin available at the following link: Classic Editor
The plugin must be Network installed and Network activated. This will disable Gutenberg for all your network sites allowing MultilingualPress version 2 to run as usual.
5. Is MultilingualPress version 3 Gutenberg ready?
Yes! If you are a user of the new version you do not have to think about anything, because Gutenberg will work in complete harmony with MultilingualPress version 3. You just have to worry about your content, learn how to make the most of the innovative editor, and focus only your business without thinking about anything else. Cool!
Now perhaps you might be a bit confused, especially if you are still using version 2, and especially if you are eager to enter the digital editing future.
As it is true that it is still possible to work with MultilingualPress 2, as we saw in the previous section, in the same way it is equally true that the possibility of evolving your platform and your skills remains limited and bond to a type of technology that is about to be surpassed.
All this can be remedied, as version 3 is Gutenberg compatible. But it would not be enough to simply say this. Version 3 is much more: it is the natural evolution of MultilingualPress version 2, able to incorporate continuous technological advances, satisfy users』 requests and expand its range of action, including new features and optimizing those already present. Do you want to know more? Here are some links:

Getting started with MultilingualPress 3
MultilingualPress 3: common questions and answers

The partnership with WooCommerce is one of the examples of the current process of strengthening our product, which aims to become the best multilingual solution on the market at enterprise level, with a special focus for WooCommerce Multisite Shops. We are proud to also share with you the WooCommerce marketplace link about MultilingualPress 3: WooCommerce MultilingualPress
Interested? Jump to our shop and have a look to the available MutilingualPress 3 licenses!
6. How to upgrade from version 2 to version 3?
Well, one easy way to get this is use our tool that executes the update automatically. Refer to this doc for further details: MultilingualPress 2 to 3 Migration Tool.
As an alternative, instead, we can provide you with a short tutorial to help you to upgrade MultilingualPress manually. Here is the link: How to manually migrate from MultilingualPress version 2 to version 3
But at the same time we wonder if the manual solution can be sufficient, and if indeed an automated solution is something necessary and what urgency our users have in this regard.
7. Get in touch!
We need your opinion, that』s the truth! Why not contact us, using the link below, and inform us about the version 2 to version 3 migration needs you have, and even if you have ideas or requests for new features in MultilingualPress 3. Your words are the best guide for us, we always consider your directions as very valuable. So, don』t wait any longer, get in touch with us now!

How to get connected post IDs by current post ID

How to get connected post IDs by current post ID

How to get connected post IDs by current post ID
To get an array of connected posts you can use the translationIds function. That method is the equivalent of mlp_get_linked_elements in MultilingualPress 2:
The first parameter is the source post id, the second is the column 「type」 in the wp_mlp_relationships table in the database and the third parameter is the source site id .
About the type value, this must be either 「post」 or 「term」, depending on whether the
Translation of a post or translation of a term is to be queried:
$translations = InpsydeMultilingualPresstranslationIds(1, 'post', 1);
it will return an array of key value pairs as site id and post id:
array (size=2)

1 => int 1

2 => int 1
You can loop through $translations like this:
if($translations) {

foreach($translations as $siteId => $postId) {
echo 'Site ID: ' . $siteId . ' Post ID: ' . $postId . '
';
}
}

MultilingualPress License Update

MultilingualPress License Update

MultilingualPress License Update
Starting from version 3.3.3 the licensing system of MultilingualPress has been updated, and the info needed to activate the license are now different, depending on the plugin version you currently use.

Table of Contents

Version minor or equal to 3.3.2 requires an Api Key and an Email AddressVersion above 3.3.2 requires a Master Api Key and a Product Id code
Version minor or equal to 3.3.2 requires an Api Key and an Email Address

The Api Key is available in your My Account page, in the Dashboard or Api Key section and it is now named as Deprecated.

The purchase Email is available in your My Account page, in the Account Details section.

You can use these information to activate your license, inserting them in your plugins settings license tab.

Version above 3.3.2 requires a Master Api Key and a Product Id code

The Master Api Key is available in your My Account page, in the Dashboard or Api Key section. This key can be used to activate any of the products you purchased.

 

The Product Id identifies the product purchased and it is available in the My Account page, in the Dashboard or Api Key section.

You can use these information to activate your license, inserting them in your plugins settings license tab.

How to get content translations programmatically

How to get content translations programmatically

How to get content translations programmatically
In order to get current content translations of the current post in MultilingualPress 3, you can use the Translations class passing the arguments via TranslationSearchArgs. Here is an example:
add_filter('the_content', function($content) {
$args =
InpsydeMultilingualPressFrameworkApiTranslationSearchArgs::forContext(
new InpsydeMultilingualPressFrameworkWordpressContext()
)->forSiteId(get_current_blog_id())->includeBase();

$translations = InpsydeMultilingualPressresolve(
InpsydeMultilingualPressFrameworkApiTranslations::class
)->searchTranslations($args);

foreach ($translations as $translation) {
$postId = $translation->remoteContentId();
$title = $translation->remoteTitle();
$url = $translation->remoteUrl();

$language = $translation->language();
$bcp47tag = $language->bcp47tag();
$englishName = $language->englishName();
$isoCode = $language->isoCode();
$locale = $language->locale();
$name = $language->name();
}

return $content;

});
Now you can loop through the $translations array where each Translation object contains translation data and language information.

Where can I find the MultilingualPress Support?

Where can I find the MultilingualPress Support?

Where can I find the MultilingualPress Support?
This tutorial is part of our MultilingualPress 2 documentation. In case you are using the newer version 3, please switch to MultilingualPress 3.
You need help for MultilingualPress, have questions, want to report bugs or suggest new features? We』re happy to help and look forward, if you help us to improve our product.
We have two possibilities to contact our support, depending on whether you use the free version of MultilingualPress or you bought our Premium Support.

Table of Contents

Individual MultilingualPress Premium SupportSupport for the MultilingualPress Free Version on wordpress.org
1. Individual MultilingualPress Premium Support
If you bought MultilingualPress Premium, you can use our personal Premium Support. The development team is there for you with advice and practical support and glad to help you with problems.
The Premium Support can be found under multilingualpress.org/support. Once you』re logged into your account, you can submit a support ticket.
If you have no account, please purchase a MultilingualPress license.
Please understand that we can not afford a free premium support.
For questions before purchasing, please use our contact form.

 
2. Support for the MultilingualPress Free Version on wordpress.org
If you use the free version of MultilingualPress, visit our forum at wordpress.org and specify your support request there please. Our general support takes place usually on Tuesdays and Thursdays for 2 hours.