# Style.css in multilingual mode

**URL:** <https://discourse.gohugo.io/t/style-css-in-multilingual-mode/20754>\
**Category:** support\
**Created:** [September 12, 2019, 1:28pm UTC](https://discourse.gohugo.io/t/style-css-in-multilingual-mode/20754 "2019-09-12T13:28:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![zabatonni](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/zabatonni/32/7942_2.png) [@zabatonni](https://discourse.gohugo.io/u/zabatonni)\
**Post date:** [September 12, 2019, 1:28pm UTC](https://discourse.gohugo.io/t/style-css-in-multilingual-mode/20754/1 "2019-09-12T13:28:14Z")

</div>

How to properly link stylesheet in head using multilingual setup.

I’m using this code:  
{{ $style := resources.Get “style.css” | resources.Minify | resources.Fingerprint “sha512” -}}

But it’s pointing from DomainB to DomainA/style.min… this way it’s broken.  
Same code works ok, when using only one domain and languageB is in subfolder.

If i switch from .Permalink to .relURL it’s working in multiple domains but not subfolder setup.

---

<div class="post-metadata">

**Author:** ![davidsneighbour](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/davidsneighbour/32/24507_2.png) [@davidsneighbour](https://discourse.gohugo.io/u/davidsneighbour)\
**Post date:** [September 12, 2019, 1:34pm UTC](https://discourse.gohugo.io/t/style-css-in-multilingual-mode/20754/2 "2019-09-12T13:34:06Z")

</div>

It does not seem to work in the asset pipes. This is not the first time I read here about issues with multi-language sites and stylesheets/javascripts. It seems there is no multi-language support in the asset pipe available.

Which means let’s light up the bat sign: @bep 😉

Another post here about the same kind of issues, this time javascript: [Is it possible to use translations in assets?](https://discourse.gohugo.io/t/is-it-possible-to-use-translations-in-assets/20726/4)

It would be nice if asset-templates would be able to use i18n-features.

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [September 12, 2019, 2:29pm UTC](https://discourse.gohugo.io/t/style-css-in-multilingual-mode/20754/3 "2019-09-12T14:29:14Z")

</div>

Just a friendly reminder that I never reply to posts that mention my name for no good reason. Note that I read most threads in here anyway, and not mentioning my nick would then be 100% more effective 🙂

---

<div class="post-metadata">

**Author:** ![davidsneighbour](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/davidsneighbour/32/24507_2.png) [@davidsneighbour](https://discourse.gohugo.io/u/davidsneighbour)\
**Post date:** [September 12, 2019, 6:06pm UTC](https://discourse.gohugo.io/t/style-css-in-multilingual-mode/20754/4 "2019-09-12T18:06:58Z")

</div>

@zabatonni have a look at this solution in the post I linked: [Is it possible to use translations in assets?](https://discourse.gohugo.io/t/is-it-possible-to-use-translations-in-assets/20726/4)

It looks like you should use a language path instead of just referencing style.css.

```auto
 | resources.ExecuteAsTemplate (printf "%s/js/script.js" $.Site.Lang ) . | 

```

I personally am not using Hugo for multilingual pages so you won’t get any helpful advise from me 😉

---

<div class="post-metadata">

**Author:** ![zabatonni](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/zabatonni/32/7942_2.png) [@zabatonni](https://discourse.gohugo.io/u/zabatonni)\
**Post date:** [September 12, 2019, 6:18pm UTC](https://discourse.gohugo.io/t/style-css-in-multilingual-mode/20754/5 "2019-09-12T18:18:28Z")

</div>

.RelPermalink is working even if baseurl is set to subfolder. But its strange to use relative links for css and js and abs urls for the rest of website.

---

<div class="post-metadata">

**Author:** ![davidsneighbour](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/davidsneighbour/32/24507_2.png) [@davidsneighbour](https://discourse.gohugo.io/u/davidsneighbour)\
**Post date:** [September 12, 2019, 6:27pm UTC](https://discourse.gohugo.io/t/style-css-in-multilingual-mode/20754/6 "2019-09-12T18:27:25Z")

</div>

Well the way you link them is relative. It could be `whatever/path/you/wish`. It’s not inside your content directory, hehe. But by using a path containing the language code you make it individual instead of Hugo trying to save time by using assets only once per run instead of once per path.

---

<div class="post-metadata">

**Author:** ![zabatonni](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/zabatonni/32/7942_2.png) [@zabatonni](https://discourse.gohugo.io/u/zabatonni)\
**Post date:** [September 12, 2019, 6:42pm UTC](https://discourse.gohugo.io/t/style-css-in-multilingual-mode/20754/7 "2019-09-12T18:42:41Z")

</div>

could you please explain that last sentence. I think i dont get it.
