adamduncan / eleventy-plugin-i18n

Eleventy plugin to assist with internationalization and dictionary translations
MIT License
103 stars 10 forks source link

Assets handling #16

Closed vogloblinsky closed 3 years ago

vogloblinsky commented 3 years ago

Hi,

Thanks for this great plugin.

How can we handle assets like css files for example ?

adamduncan commented 3 years ago

Hi @vogloblinsky. Can you please elaborate a little on what you mean by "handle assets"?

vogloblinsky commented 3 years ago

I have a site with two languages : fr & en The rendered website is :

/en-en/index.html
/fr-fr/index.html

When i put a css file in my src folder, i cannot use it in my main template.

adamduncan commented 3 years ago

Are you trying to use the same stylesheet in both, or a different stylesheet per language? Do you have a minimal repreoduction you can share? I'm not sure this is plugin-related, but trying to better understand where you're headed.

(Also, just a side note: Looking at the language site sub-directories you mention (en-en and fr-fr), depending on whether you're targetting specific English regions, I might suggest either going with generic en or aligning with a en-GB or en-US, for example (see ISO examples). Accept-Language language notes and its spec give us a good idea of how to structure these. Hope that helps.)

adamduncan commented 3 years ago

Hey @vogloblinsky — not sure where you got to on this one. Closing for now. Re-open if there are any issues 👍