Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin lacks multilanguage support/instructions #22

Open
spamrakuen opened this issue May 22, 2018 · 2 comments
Open

Plugin lacks multilanguage support/instructions #22

spamrakuen opened this issue May 22, 2018 · 2 comments

Comments

@spamrakuen
Copy link

spamrakuen commented May 22, 2018

I don't want my spanish page to show english tags.

This is how I've fixed this;

  • I've created another taxonomy for my spanish tags in user/config/site.yaml:
    taxonomies: [category,tag,tages] # added tages for spanish tags
  • I've added some parameters to the plugin yaml config file (taxonomylist.yaml):

enabled: true
route: '/blog'
language:
__en:
____taxonomy: 'tag'
__es:
____taxonomy: 'tages'

(where __ is a tab)

  • In my theme's sidebar.html.twig, I've this:
    {% include 'partials/taxonomylist.html.twig' with {'base_url':new_base_url, 'taxonomy':config.plugins.taxonomylist.language[grav.language.getLanguage()].taxonomy} %}

This way, the plugin becomes multilanguage.

@rhukster
Copy link
Member

There's actually no strings in the plugin. The taxonomy comes directly from Grav, and each page in each translation can have it's own translated taxonomy types. Basically, as you have done already.
You shouldn't need to pass in the translated taxonomy as it should already be translated for the current language.

@Sogl
Copy link

Sogl commented Nov 8, 2022

It works but creates each language url (en_tag, fr_tag etc) instead of tag. The usual tag in URL doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants