# Hugo new always put new files on /en/

**URL:** <https://discourse.gohugo.io/t/hugo-new-always-put-new-files-on-en/19095>\
**Category:** support\
**Created:** [June 7, 2019, 4:43pm UTC](https://discourse.gohugo.io/t/hugo-new-always-put-new-files-on-en/19095 "2019-06-07T16:43:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![icf20](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/icf20/32/8896_2.png) [@icf20](https://discourse.gohugo.io/u/icf20)\
**Post date:** [June 7, 2019, 4:43pm UTC](https://discourse.gohugo.io/t/hugo-new-always-put-new-files-on-en/19095/1 "2019-06-07T16:43:09Z")

</div>

the config file has `defaultContentLanguage = "es"`

and language config file

```
 [es]
  languageCode = "es-es"
  contentDir = "content/es"
[en]
  languageCode = "en-us"
  contentDir = "content/en"  

```

examples

```
hugo new test.md 
/snip//content/en/test.md created

hugo new es/test.md
/snip//content/en/es/test.md created

```

there is no way for hugo to create files correctly?

---

<div class="post-metadata">

**Author:** ![brunoamaral](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/brunoamaral/32/21144_2.png) [@brunoamaral](https://discourse.gohugo.io/u/brunoamaral)\
**Post date:** [June 7, 2019, 9:42pm UTC](https://discourse.gohugo.io/t/hugo-new-always-put-new-files-on-en/19095/2 "2019-06-07T21:42:35Z")

</div>

Can you share the whole config.toml ?

---

<div class="post-metadata">

**Author:** ![icf20](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/icf20/32/8896_2.png) [@icf20](https://discourse.gohugo.io/u/icf20)\
**Post date:** [June 13, 2019, 2:55pm UTC](https://discourse.gohugo.io/t/hugo-new-always-put-new-files-on-en/19095/3 "2019-06-13T14:55:58Z")

</div>

the default for academic theme changing the default language to es does nothing if the language file have en and content/en folder set it will always put the new content there

```
# Configuration of Academic
# Documentation: https://sourcethemes.com/academic/
#
# This file is formatted using TOML syntax - learn more at https://learnxinyminutes.com/docs/toml/
# Each configuration section is defined by a name in square brackets (e.g. `[outputs]`).

# Title of your site
title = "Academic"

# The URL of your site.
# End your URL with a `/` trailing slash, e.g. `https://example.com/`.
baseurl = "/"

# Enter a copyright notice to display in the site footer.
# To display a copyright symbol, type `&copy;`. For current year, type `{year}`.
copyright = ""

# Enable analytics by entering your Google Analytics tracking ID
googleAnalytics = ""

# Enable comments by entering your Disqus shortname
disqusShortname = ""

############################
## Advanced options below ##
############################

# Name of Academic theme folder in `themes/`.
theme = "academic"

# Get last modified date for content from Git?
enableGitInfo = false

# Default language to use (if you setup multilingual support)
defaultContentLanguage = "es"
hasCJKLanguage = false # Set `true` for Chinese/Japanese/Korean languages.
defaultContentLanguageInSubdir = true

paginate = 10 # Number of items per page in paginated lists.
enableEmoji = true
footnotereturnlinkcontents = "<sup>^</sup>"
ignoreFiles = ["\\.ipynb$", ".ipynb_checkpoints$", "\\.Rmd$", "\\.Rmarkdown$", "_files$", "_cache$"]

[outputs]
  home = ["HTML", "RSS", "JSON"]
  section = ["HTML", "RSS"]

# Configure BlackFriday Markdown rendering.
# See: https://gohugo.io/getting-started/configuration/#configure-blackfriday
[blackfriday]
  hrefTargetBlank = true # `true` opens external links in a new tab. See https://github.com/gohugoio/hugo/issues/2424
	angledQuotes = false
	latexDashes = true
  extensions = ["backslashLineBreak"]

[imaging]
  resampleFilter = "lanczos"
  quality = 90
  anchor = "smart" # Anchor for cropping. Options include Smart and Center.

# Taxonomies.
[taxonomies]
  tag = "tags"
  category = "categories"
  publication_type = "publication_types"
  author = "authors"
```

---

<div class="post-metadata">

**Author:** ![brunoamaral](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/brunoamaral/32/21144_2.png) [@brunoamaral](https://discourse.gohugo.io/u/brunoamaral)\
**Post date:** [June 13, 2019, 3:27pm UTC](https://discourse.gohugo.io/t/hugo-new-always-put-new-files-on-en/19095/4 "2019-06-13T15:27:23Z")

</div>

That config.toml is not setting any multilanguage parameters necessary for Hugo, that’s why the content is showing up where it doesn’t belong.

It should have a block that looks something like this:

```auto
[languages]
  [languages.en]
    title = "My blog"
    weight = 1
    [languages.en.params]
      linkedin = "https://linkedin.com/whoever"
  [languages.fr]
    title = "Mon blogue"
    weight = 2
    [languages.fr.params]
      linkedin = "https://linkedin.com/fr/whoever"
      [languages.fr.params.navigation]
        help = "Aide"

```

Take a look here: [https://gohugo.io/content-management/multilingual/](https://gohugo.io/content-management/multilingual/)

---

<div class="post-metadata">

**Author:** ![icf20](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/icf20/32/8896_2.png) [@icf20](https://discourse.gohugo.io/u/icf20)\
**Post date:** [June 13, 2019, 3:32pm UTC](https://discourse.gohugo.io/t/hugo-new-always-put-new-files-on-en/19095/5 "2019-06-13T15:32:33Z")

</div>

language.conf file have

> [es]  
> languageCode = “es-es”  
> contentDir = “content/es”  
> [en]  
> languageCode = “en-us”  
> contentDir = “content/en”

---

<div class="post-metadata">

**Author:** ![brunoamaral](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/brunoamaral/32/21144_2.png) [@brunoamaral](https://discourse.gohugo.io/u/brunoamaral)\
**Post date:** [June 14, 2019, 1:17pm UTC](https://discourse.gohugo.io/t/hugo-new-always-put-new-files-on-en/19095/6 "2019-06-14T13:17:49Z")

</div>

Alright, then you are using several files as explained here? [https://gohugo.io/getting-started/configuration/#configuration-file](https://gohugo.io/getting-started/configuration/#configuration-file)

I haven’t used that method before.

Any chance you can share the full source code so we can run some tests?

---

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [February 28, 2020, 8:12am UTC](https://discourse.gohugo.io/t/hugo-new-always-put-new-files-on-en/19095/7 "2020-02-28T08:12:40Z")

</div>


