I've written my language switcher as below.
It works from /
or from /blog/<blog-post>
but it does not work from the /blog
page even if /en/blog
is available.
<a href="{{ '.'|url(alt='jp') }}">Japanese</a> | <a href="{{ '.'|url(alt='en') }}"> English </a>
Is it bug or should I fix something?
Below is my web site language switcher is available on top-right of the page.
- Working (top level page): http://www.socoka.com/
- Not working (Blog page): http://www.socoka.com/blog/
In Lektor versions < 2 there are some limitations with regards to the alts. This is working correctly in Lektor 2 which is currently in development only. But you can install it from the git master if you already want to use it.