# Multilanguage

**URL:** <https://discourse.gohugo.io/t/multilanguage/35855>\
**Category:** support\
**Created:** [December 1, 2021, 12:34pm UTC](https://discourse.gohugo.io/t/multilanguage/35855 "2021-12-01T12:34:06Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ddanawoski](https://avatars.discourse-cdn.com/v4/letter/d/edb3f5/32.png) [@ddanawoski](https://discourse.gohugo.io/u/ddanawoski)\
**Post date:** [December 1, 2021, 12:34pm UTC](https://discourse.gohugo.io/t/multilanguage/35855/1 "2021-12-01T12:34:06Z")

</div>

I am trying to use the Multilanguage feature but I am not able to generate the files. I am getting a blank page on localhost:1313/fr.

So this is my setup

```nohighlight
languageCode = 'en-us'
title = 'My New Hugo Site'
defaultContentLanguage = 'en'

##Languages code
[Languages]
  [languages.en]
      baseURL = 'http://localhost:1313/'
      languageName = 'English'
      title = 'In English'
      weight = 1
  [languages.fr]
      baseURL = 'http://localhost:1313/fr'
      languageName = 'Français'
      title = 'French'
      weight = 2

```

On the markdown. I made two files in content

- \_index.md for the english homepage
- \_index.fr.md - I was thinking this is suppose to show up for localhost:1313/fr or locahost:1313.fr. But I don’t see this \_index.fr.md page.

Please help. I have followed the documentation but I am not sure where I am getting things wrong.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [December 1, 2021, 5:48pm UTC](https://discourse.gohugo.io/t/multilanguage/35855/2 "2021-12-01T17:48:08Z")

</div>

Define `baseURL` at the root of your configuration file, and remove the `baseURL` values from the language tables.

```diff
diff --git a/config.toml b/config.toml
index c14492852..b3fe11086 100644
--- a/config.toml
+++ b/config.toml
@@ -1,14 +1,13 @@
+baseURL = 'https://example.org/'
 languageCode = 'en-us'
 title = 'My New Hugo Site'
 defaultContentLanguage = 'en'
 
 [languages.en]
-baseURL = 'http://localhost:1313/'
 languageName = 'English'
 title = 'In English'
 weight = 1
 [languages.fr]
-baseURL = 'http://localhost:1313/fr'
 languageName = 'Français'
 title = 'French'
 weight = 2

```

---

<div class="post-metadata">

**Author:** ![ddanawoski](https://avatars.discourse-cdn.com/v4/letter/d/edb3f5/32.png) [@ddanawoski](https://discourse.gohugo.io/u/ddanawoski)\
**Post date:** [December 1, 2021, 5:59pm UTC](https://discourse.gohugo.io/t/multilanguage/35855/3 "2021-12-01T17:59:58Z")

</div>

HI @jmooring : Thank you for your response. I tried what you just sent over but doesn’t work. I get errors, hugo server doesn’t work. What is the easiest way to go about doing multilanguage sites. The documentation is so confusing in line with this. I tried everything there but doesn’t work. I also read through a few materials online - tried the Content Dir options - same issues.

what is the relationship between menu and the language? I have [languages] and [menu] - English works but the index.fr.md doesn’t.

[How to Make a Multilingual Website with Hugo](https://yonkov.github.io/post/how-to-make-a-mulilingual-website-with-hugo/) - This material worked but I don’t know why I have to write all the menu in [languages.en.menu], [languages.fr.menu].

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [December 1, 2021, 6:02pm UTC](https://discourse.gohugo.io/t/multilanguage/35855/4 "2021-12-01T18:02:29Z")

</div>

Can you share your repository?

---

<div class="post-metadata">

**Author:** ![ddanawoski](https://avatars.discourse-cdn.com/v4/letter/d/edb3f5/32.png) [@ddanawoski](https://discourse.gohugo.io/u/ddanawoski)\
**Post date:** [December 1, 2021, 6:46pm UTC](https://discourse.gohugo.io/t/multilanguage/35855/5 "2021-12-01T18:46:51Z")

</div>

> **[GitHub - ddanawoski/core-cognition](https://github.com/ddanawoski/core-cognition)**
>
> Contribute to ddanawoski/core-cognition development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [December 1, 2021, 7:19pm UTC](https://discourse.gohugo.io/t/multilanguage/35855/6 "2021-12-01T19:19:01Z")

</div>

> [@jmooring](#):
>
> Define `baseURL` at the root of your configuration file, and remove the `baseURL` values from the language tables.

You did the first part, but not the second. When you see a `diff` file like I posted above, a minus sign at the beginning indicates the line has been deleted, while a plus sign indicate the line has been added.

You didn’t delete the lines; you pasted the `diff.`

Next, details matter. When the documentation shows this:

```auto
[languages]

```

Don’t do this:

```auto
[Languages]

```

Please read the [TOML documentation](https://toml.io/en/v1.0.0) to understand important syntax details such as:

- How to represent numbers (no quotes)
- How to represent boolean values (no quotes)
- When you can omit a table name (when there’s a sub-table)

> **Here's a clean site configuration file**
>
> ```toml
> baseURL = 'https://example.org/'
> languageCode = 'en-us'
> title = 'My New Hugo Site'
> defaultContentLanguage = 'en'
> 
> [languages.en]
> languageName = 'English'
> title = 'In English'
> weight = 4
> languagedirection = 'rtl'
> 
> [languages.fr]
> languageName = 'Français'
> title = 'French'
> weight = 5
> 
> [[menu.navmenu]]
> identifier = 'basicinsight'
> name = 'Basic Insight'
> pageref = '/basic-insight'
> weight = 1
> 
> [[menu.navmenu]]
> identifier = 'Analyses'
> name = 'analyses'
> pageref = '/analyses'
> weight = 2
> 
> [[menu.navmenu]]
> identifier = 'blog'
> name = 'blog'
> pageref = '/blog'
> weight = 3
> 
> [params]
> logo = '/images/core-cognition-logo.svg'
> alt = 'asds'
> url = '/'
> favicon = ''
> blogpostId = '619f99a4cb879275fad566e6'
> dataId = '61996b3541cc105c084a9af1'
> 
> [taxonomies]
> tag = 'tags'
> category= 'categories'
> author = 'authors'
> 
> ```

Finally, the Analyses section is still in draft mode. See:  
`content/analyses/_index.md`

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [December 1, 2021, 7:33pm UTC](https://discourse.gohugo.io/t/multilanguage/35855/7 "2021-12-01T19:33:40Z")

</div>

You also have several deprecated constructs. Please replace `.URL` with either `.RelPermalink` or `.Permalink`

- [https://github.com/ddanawoski/core-cognition/blob/main/layouts/partials/breadcrumb\_code.html#L7](https://github.com/ddanawoski/core-cognition/blob/main/layouts/partials/breadcrumb_code.html#L7)
- [https://github.com/ddanawoski/core-cognition/blob/main/layouts/partials/homepage/section\_analyses.html#L7](https://github.com/ddanawoski/core-cognition/blob/main/layouts/partials/homepage/section_analyses.html#L7)
- [https://github.com/ddanawoski/core-cognition/blob/main/layouts/partials/homepage/section\_basics.html#L16](https://github.com/ddanawoski/core-cognition/blob/main/layouts/partials/homepage/section_basics.html#L16)

---

<div class="post-metadata">

**Author:** ![ddanawoski](https://avatars.discourse-cdn.com/v4/letter/d/edb3f5/32.png) [@ddanawoski](https://discourse.gohugo.io/u/ddanawoski)\
**Post date:** [December 2, 2021, 4:35am UTC](https://discourse.gohugo.io/t/multilanguage/35855/8 "2021-12-02T04:35:32Z")

</div>

When I replace .URL with .Permalink or .RelPermalink I get errors. The documentation for Menu still states URL on the config file. I also tried changing the config - URL to permalink - Errors.

- 

```auto

```

can’t evaluate field RelPermalink in type \*navigation.MenuEntry

```auto

```

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [December 2, 2021, 4:37am UTC](https://discourse.gohugo.io/t/multilanguage/35855/9 "2021-12-02T04:37:51Z")

</div>

I my previous post I pointed to 3 places, and 3 places only, to make the change.

I suspect you changed it somewhere else too.
