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

🌐 feat(i18n): add Dutch language #290

Merged
merged 3 commits into from
Apr 17, 2024
Merged

🌐 feat(i18n): add Dutch language #290

merged 3 commits into from
Apr 17, 2024

Conversation

Myrdincx
Copy link
Contributor

@Myrdincx Myrdincx commented Apr 11, 2024

Summary

Related issue

Changes

Accessibility

Screenshots

Type of change

  • Bug fix (fixes an issue without altering functionality)
  • New feature (adds non-breaking functionality)
  • Breaking change (alters existing functionality)
  • UI/UX improvement (enhances user interface without altering functionality)
  • Refactor (improves code quality without altering functionality)
  • Documentation update
  • Other (please describe below)
    Adding a translation (Dutch/Flemish)

Checklist

Haven't tested it out, but it should be fine, I assume?
I can test if needed.

  • I have verified the accessibility of my changes
  • I have tested all possible scenarios for this change
  • I have updated theme.toml with a sane default for the feature
  • I have made corresponding changes to the documentation:
    • Updated config.toml comments
    • Updated theme.toml comments
    • Updated "Mastering tabi" post in English
    • (Optional) Updated "Mastering tabi" post in Spanish
    • (Optional) Updated "Mastering tabi" post in Catalan

@Myrdincx Myrdincx requested a review from welpo as a code owner April 11, 2024 21:21
@Myrdincx Myrdincx changed the title Create 🌐 Add Dutch-Flemish language 🌐 Add Dutch-Flemish language Apr 11, 2024
@Myrdincx Myrdincx changed the title 🌐 Add Dutch-Flemish language nl.toml Apr 11, 2024
🌐 Add Dutch-Flemish language
@Myrdincx
Copy link
Contributor Author

For some reason I'm unable to test out if it works.
I tried creating a /i18n/ directory on the test website I'm using, following the "Lost in Translation" instructions but the website doesn't seem to pick the language up. Resulting in everything being in English and the "change language" button not showing

@welpo
Copy link
Owner

welpo commented Apr 12, 2024

Hi @Myrdincx!

Thank you for this PR. I will test it as soon as I can (next week) before merging.

The custom i18n file should work, so I will check that out as well.

Cheers

@Myrdincx
Copy link
Contributor Author

Myrdincx commented Apr 12, 2024

I probably did something wrong but I have no clue what. What I did:

  • created a i18n folder in the main directory
  • created a nl.toml file in the i18n folder
  • changed config.toml to include
[language.nl]
<config here>
  • added the _index.nl.md in all the content folders (pages, projects, ...)
  • tried to zola serve

Result:
Website did build and was accessible but everything was in English, the option to change languages was not available

@welpo
Copy link
Owner

welpo commented Apr 17, 2024

Did you add any actual posts in nl? E.g. files like content/blog/faq-languages/index.nl.md.

In any case, I was able to test it locally with these steps:

  • Create i18n folder on root Zola site dir
  • Add your nl. toml
  • Set default_language = "nl" in config.toml
  • zola serve

Thank you for your contribution!

@welpo welpo changed the title nl.toml 🌐 feat(i18n): add Dutch language Apr 17, 2024
@welpo welpo merged commit 07bd0e1 into welpo:main Apr 17, 2024
2 of 4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants