-
Notifications
You must be signed in to change notification settings - Fork 14
Description
The multilingual plugin doesn't provide any support to localize tags and categories.
Reason behind the proposal
Categories and tags are relevant for SEO indexing:
- when a category is used in the URL of a post
- when categories and tags are displayed at the bottom of every post
Expected behaviour
If we had a it, en, multilingual site, where Italian is the main language, I would like:
- Italian posts' URL should display Italian categories
- English posts' URL should display English categories
and:
- Italian posts should display Italian categories and tags at the bottom of the post
- English posts should display English categories and tags at the bottom of the post
Moreover I would like:
- tags list and tag cloud were generated accordingly to localization
- categories list and categories cloud were generated accordingly to localization
Proposed solution
The tags and categories written in the site's main language should be used as id for localized tags and categories.
For example in site's _data directory should exist tags and categories translation files:
_data
|
+-- tags_it.yml
+-- tags_en.yml
+-- categories_it.yml
+-- categories_en.yml
where in each file:
- on the left should be the id, in other words the name of a tag/category in the site's main language (Italian in this case)
- on the left should be the name of a tag/category in the localized file language
So tags_it.yml should contains:
indicizzazione: indicizzazione
programmazione: programmazione
software-libero: software liberoand tags_en.yml should contains:
indicizzazione: indexing
programmazione: programming
software-libero: free softwareFinally localized post's front matter should contain tags id and categories id.
So 2016-02-04-blog-multilingua-con-octopress.markdown should contains:
---
layout: post
lang: it
title: "Blog multilingua con Octopress"
date: 2016-02-04 18:54:11 +0100
categories: [articolo]
tags: [indicizzazione, programmazione]
---
In questo fantastico articolo scopriremo come scrivere blog multilingua con Octopress.and 2016-02-04-multilingual-blog-with-octopress.markdown should contains:
---
layout: post
lang: en
title: "Multilingual Blog with Octopress"
date: 2016-02-04 18:54:11 +0100
categories: [articolo]
tags: [programmazione, software-libero]
---
In this awesome post we'll discover how to write multilingual blog with Octopress.At site generation octopress/jekyll should replace each tag id and category id with the localized tag name and the localized category name red from the site's _data directory.
Considerations
A post should have the same category across different languages.
A post might not have the same tags for each language, this is particularly relevant for SEO because a translation of the same text almost never has the same word frequency (good candidates for being a tag) across translations. Clearly the main tags might exists in each translation, even if in one they might occurs less then in another one.
An improvement to the proposed solution would be the one which allows writing localized tags and categories in the localized post's front matter, but still tags list/cloud and categories list/cloud should be generated properly.
Thank you very much in advance for your help,
Tarin