rothsandro / eleventy-notes

A template for Eleventy to publish your personal notes or docs.
https://eleventy-notes.sandroroth.com/
138 stars 16 forks source link

Add language to app.js? #45

Closed web0174 closed 10 months ago

web0174 commented 10 months ago

Hello, can you add language to app.js?

base.layout.njk

<html lang="{{ app.language }}" data-theme="system"> 

app.js

module.exports = defineConfig({
  language: "it",
})

That's what I did, but I don't know if it's the best way, that's up to you. Now in the html I see my language. Sorry for my English, but it's not my language. Thank you! πŸ˜€


<html lang="it" data-theme="system" class="supports-js"><head>
rothsandro commented 10 months ago

Sure, I can add a config option for the language. Is all your content in Italian? Not just the markdown content but sections / groups in the sidebar (e.g. folders), tags and custom properties.

In addition, we'll need to add lang="en" on UI elements of Eleventy Notes (search, bookmarks, ...) as they are always in English.

web0174 commented 10 months ago

Tutti i tuoi contenuti sono in italiano? Non solo il contenuto del markdown ma anche sezioni/gruppi nella barra laterale (ad esempio cartelle), tag e proprietΓ  personalizzate

Thanks for your answer πŸ™. For now I haven't translated almost anything because I'm doing a bit of testing and comparing between 4 different ssg. Thanks!! πŸ‘‹πŸ»

rothsandro commented 10 months ago

Feature shipped πŸŽ‰ Eleventy Notes v0.20.0 adds a new lang config option