Since last month, I have been working on making this blog multilingual.
I used “Polylang” as a plugin, and although it would be easier to use Google Translate to automatically make it multilingual, I was a little concerned about the quality of the translations, so I decided to use a plugin that allows me to translate and post my own translations.
Since I have just started working on this, it is still a trial and error process, and there does not seem to be enough information on the web, so I will gradually introduce what I have found out.
For translation from Japanese, we used DeepL. Screenshots are taken from a Japanese environment. We will replace them with English screenshots as much as possible.
How to create a new article in another language in Polylang
Generally, most information says to create from the “+” in the list of posts.
Now, when introducing Polylang and actually creating articles in other languages, the first operation is this.
By clicking on the “+” mark, an “English article corresponding to the Japanese article on the left” will be created and set to be smoothly switched by the language switcher, tied together on a one-to-one basis.
If the same articles in different languages are not properly linked together, the transition will not be correct when the reader switches languages.
The downside of this method
This method of creating an article in another language is very difficult.
When you create a new post in another language, it is a blank, empty post.
We really want to create articles in other languages by “duplicating” the original article, switching the language of the duplicated article, and then gradually translating it. This would be by far the easiest way to do it.
I was about to give up, thinking that it would be impossible to just duplicate an article and switch the language of that article, because it would fail because it would not be tied to the original article.
How to link an article created by duplicating the original article as a different language version
There is actually a way to duplicate the original article, switch only the language, and then link the article in another language to the original article.
How to link duplicated articles in other languages to the original article
1. Duplicate the original article
Plug-ins make it easy to duplicate articles. We use Yoast Duplicate Post.
2. Switching the language of duplicated articles
Once you have duplicated the article, enter the edit screen of the duplicated article.
At this point, the duplicated article is an independent Japanese article, since it was just duplicated. If we were to “publish” the article as is, it would be as if there were two exactly the same articles.
Use the language switcher in the right pane of the duplicated article to switch the language of the article.
However, the operation so far still only results in an independent English article.
3. Operation to be tied to the original article.
I just switched languages, and under the “Translate” column, I see the Japanese flag.
Clicking the “+” mark here will create a new article in another language (in this case, Japanese).
Instead, enter part of the title of the original Japanese article in the input field on the right.
Then, like this, you can search from existing article titles and find articles with linking candidates. By clicking on it, you can decide which article will actually be linked as a different language version.
4.Update article
In this way, after performing the linking operation, update the article or save it as a draft.
The “+” mark on the right side of the original article has changed to a pencil mark.
You can see that the article you created by duplicating is recognized as a different language version.
コメント