Prefix with multilingual support

Hi
next newbie question - can i do something like this

IN en.toml

[scrum_info]
other = " SCRUM Lorem Ipsum "

[devops_info]
other = " DevOps Lorem Ipsum "

in the x.htmL
ā€¦

{{ $prefix        :=  ("scrum" }}
...
<p>{{ i18n $prefix"_info"  }}</p>

and how do i set the Prefix via URL?

thanks for help
rob

I tried this ā€¦

{{ $prefix      :=  ("scrum") }}

{{ $i18n_tag    :=  print $prefix "_info" }}
<p>{{$prefix}}</p>

<p>{{$i18n_tag}}</p>

<p>{{ i18n "{{$i18n_tag}}"  }}</p>

But this gives me

<p>scrum</p>
<p>scrum_info</p>
<p></p>

So no clue what to do an wher to debug ā€¦
Thanks for Help rob

thsi does not work either

{{ i18n "{{print $i18n_tag}}" }}

got it - it works with pipes

{{print $i18n_tag | i18n }}

1 Like

When needed please post links to the official Hugo Documentation, not to third party mirrors of the official documentation.

In the past we have seen other documentation mirrors being changed into spam sites and then we had to manually remove those links from forum posts.

Thank you for the understanding.

sure - ok !

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.