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 for portfolio? #397

Closed
v-glb opened this issue Nov 13, 2022 · 1 comment · Fixed by #481
Closed

Multilanguage for portfolio? #397

v-glb opened this issue Nov 13, 2022 · 1 comment · Fixed by #481
Assignees
Labels
enhancement New feature or request

Comments

@v-glb
Copy link

v-glb commented Nov 13, 2022

Is your feature request related to a problem? Please describe.
Hi, I really love the theme so far!

I have a question regarding multilanguage feature: Can it also be applied to the portfolio page and if so, how? It seems like that it doesn't work for it, at least I have noticed on the example site that the language switch disappears when navigation to the portfolio and couldn't get it to work on my own site.

Describe the solution you'd like
Since the portfolio is configured via /data/portfolio.yml, perhaps we can create a structure with multiple .yml files (like creating multiple contentDirs for each language) like so:

image

Any questions or more information needed, just ask.

Thanks in advance,
Vadim

@v-glb v-glb added the enhancement New feature or request label Nov 13, 2022
@pgrepds
Copy link
Contributor

pgrepds commented Sep 17, 2023

This should be relatively easy to implement.

As a local quick fix, do the following:

  1. Create a portfolio directory inside layouts.
  2. Copy layouts/portfolio/list.html from the GitHub repository of the theme to the directory created in the first step.

Then, replace the second line of list.html with

{{ $data := index .Site.Data .Site.Language.Lang }}
{{ range $index, $elemen:= $data.portfolio.portfolioitems }}

Be aware that this overrides the list.html implementation of the theme. Thus, for future updates you need to merge manually.

@lxndrblz lxndrblz linked a pull request Jul 24, 2024 that will close this issue
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants