github.com/rabbouni145/gg@v0.47.1/docs/content/en/functions/relLangURL.md (about) 1 --- 2 title: relLangURL 3 description: Adds the relative URL with correct language prefix according to site configuration for multilingual. 4 godocref: 5 date: 2017-02-01 6 publishdate: 2017-02-01 7 lastmod: 2017-02-01 8 keywords: [multilingual,i18n,urls] 9 categories: [functions] 10 menu: 11 docs: 12 parent: "functions" 13 signature: ["relLangURL INPUT"] 14 workson: [] 15 hugoversion: 16 relatedfuncs: [] 17 deprecated: false 18 aliases: [] 19 --- 20 21 `absLangURL` and `relLangURL` functions are similar to their [`absURL`](/functions/absurl/) and [`relURL`](/functions/relurl/) relatives but will add the correct language prefix when the site is configured with more than one language. (See [Configuring Multilingual][multiliconfig].) 22 23 So for a site `baseURL` set to `https://example.com/hugo/` and the current language is `en`: 24 25 ``` 26 {{ "blog/" | absLangURL }} → "https://example.com/hugo/en/blog/" 27 {{ "blog/" | relLangURL }} → "/hugo/en/blog/" 28 ``` 29 30 [multiliconfig]: /content-management/multilingual/#configuring-multilingual-mode