четверг, 3 августа 2017 г.

How do I set bilingual or multilingual blogger ?


It is not so difficult to create multilingual blog using blogger (blogspot) from google. There are several approaches to make bilingual or multilingual blogs, but not for blogger. Wordpress is much more convenient or many of bloggers explained how to do it with Wordpress. I searched for a solution and tried several things until I get it work properly work in blogger. Even in an hopeless time, I wanted to give a try to Wordpress and move all my posts to Wordpress from blogger. Then I found a way of setting up a bilingual blog for blogger.

Let's start with the idea of making bilingual site. There are translation solutions which are suggested by other blogger. But these translators are still not performing good. Human translation is always easier and better to understand and more convenient for the readers.

I had posts both in Tukish and in English in my blog. I didn't want to split two languages into to different blog. That will split the traffic of the blog. I preferred to keep them all in one blog.

Tutorial on how to make bilingual blogger

For a multilingual site, you need a menu theme. It is easier to click one menu item for each language selection.

To identify the languages in the posts I added tags (or labels) to each post that determines the language of the post. Let say "TR" for Turkish and "EN" for English.

To render only posts in one language (or one label let say "EN") you should call your blog as follows:

http://yourblogname.blogspot.com/search/label/EN

This link on the web browser will bring only your blog posts with "EN" label. Now you know how to render posts of just one language. For another language, you should change TAG in your link, according to your label. In my case it is just to replace "EN" with "TR"

Next step is how to render main page with the search label parameters. You should go to your bloger. Select SETTINGS, SEARCH PREFERENCES and CUSTOM REDIRECTS.
Add From link just "/" slash mark. This means your blog name.
Add To link "/search/label/TR" where TR is your label to reference posts of that language. So your main page will be a page with label search parameter. Finally check the "Permanent" box, Click Save and than "Save Changes".

Now your main page with the selected language is ready. Final issue is to set the second language. You should use one of the menu link on your theme for this. Then go to blogger, Template, Edit HTML.
HTML codes will be visible. Search for the Link item you want to use. Replace this link with the language identifier. And give the link with the search label parameter. Your HTML code line should look like this.

<li><a href='/search/label/TR'>Türkçe</a></li>
Same idea as we made with redirection. When mouse lick on this link only posts with TR labels will be rendered.

In this solution, gadgets, image buttons will be only in one language. These details are not replaced with selected language and kept in original language.

Other solutions such as java scripting and META Refresh will not bring that simple solution and have problems with the search engines.
I hope you enjoy. Any questions are welcome.

0 коммент.:

Отправить комментарий