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

Multilanguage support #254

Open
environmentalistvip opened this issue Dec 25, 2019 · 3 comments
Open

Multilanguage support #254

environmentalistvip opened this issue Dec 25, 2019 · 3 comments

Comments

@environmentalistvip
Copy link

Hello,

I wanted to be able to view links to switch the language of the web site. However it seems that the partials to display the secondary languages are missing:
https://gohugo.io/content-management/multilingual/#reference-the-translated-content

I wish I could do a pull request, but it beyond my coding ability. It would be amazing to have the theme support multilanguage blogs.

@Guillawme
Copy link

Guillawme commented Mar 3, 2020

I started tinkering with this, I will let you know when I have it online on my website. If it looks fine, I could clean it up and submit a pull request here, but I have no idea whether my solution integrates well with Minimo.

I figured that this would work as a new translations widget. If the current page has translations, and if the widget is activated, then a list of links to the equivalent page in other languages is displayed. It makes the most sense to have this widget in the sidebar (it looks really ugly in the header, and not visible enough in the footer for pages taller than one screen). I have a working solution, but I am not sure how to integrate it well with the CSS and the configuration system of Minimo.

@Guillawme
Copy link

Guillawme commented Mar 4, 2020

You can see it in action on my website. All pages listed in the top menu (Blog, About, Contact, etc.) are translated, so when you navigate to them you should see in the sidebar a link FR: <page title in French> (conversely, if you're on the French version of these pages, the link will be EN: <page title in English>). I don't translate my blog posts (because I post completely different things in French and English), so if you navigate to any blog post you won't see the translation link.

Here is the commit showing how I made this widget. I copied the social_menu widget and replaced its content with this piece of code from the Hugo documentation.

@troyane
Copy link
Contributor

troyane commented Sep 24, 2020

@MunifTanjim how is it going? Do you plan to add this feature to newer theme version?

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