# Deprecations in v0.158.0

**URL:** <https://discourse.gohugo.io/t/deprecations-in-v0-158-0/56869>\
**Category:** tips & tricks\
**Created:** [March 16, 2026, 6:35pm UTC](https://discourse.gohugo.io/t/deprecations-in-v0-158-0/56869 "2026-03-16T18:35:50Z")\
**Posts on this page:** 1\
**Page:** 1

<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:** [March 16, 2026, 6:35pm UTC](https://discourse.gohugo.io/t/deprecations-in-v0-158-0/56869/1 "2026-03-16T18:35:50Z")

</div>

## Background

In [v0.158.0](https://github.com/gohugoio/hugo/releases/tag/v0.158.0) we renamed some language-related template methods and their corresponding project configuration settings. Although there were several reasons for doing so, the primary reason was to eliminate API stutter.

_API stutter_ refers to a redundant naming convention where a library or package name is repeated in its own exported types or functions, such as `Language.LanguageDirection`.

## Deprecated template methods

The following table outlines the transition from stuttering methods to cleaner and more precise alternatives.

| Deprecated method | Replacement | Reason |
| --- | --- | --- |
| `Page.Language.Lang` | [`Page.Language.Name`](https://gohugo.io/methods/page/language/#name) | Eliminate API stutter and create naming symmetry with the [version](https://gohugo.io/quick-reference/glossary/#version) and [role](https://gohugo.io/quick-reference/glossary/#role) APIs. |
| `Site.Language.Lang` | [`Site.Language.Name`](https://gohugo.io/methods/site/language/#name) | Same as above. |
| `Page.Language.LanguageCode` | [`Page.Language.Locale`](https://gohugo.io/methods/page/language/#locale) | Eliminate API stutter and adopt the industry-standard “Locale” to more accurately define language and region combinations such as `en-US`. |
| `Site.Language.LanguageCode` | [`Site.Language.Locale`](https://gohugo.io/methods/site/language/#locale) | Same as above. |
| `Page.Language.LanguageDirection` | [`Page.Language.Direction`](https://gohugo.io/methods/page/language/#direction) | Eliminate API stutter. |
| `Site.Language.LanguageDirection` | [`Site.Language.Direction`](https://gohugo.io/methods/site/language/#direction) | Same as above. |
| `Page.Language.LanguageName` | [`Page.Language.Label`](https://gohugo.io/methods/page/language/#label) | Eliminate API stutter. |
| `Site.Language.LanguageName` | [`Site.Language.Label`](https://gohugo.io/methods/site/language/#label) | Same as above. |
| `Page.Language.Weight` | N/A | This method is redundant in templates as the collections returned by [`Page.AllTranslations`](https://gohugo.io/methods/page/alltranslations/), [`Page.Translations`](https://gohugo.io/methods/page/rotate/), and [`Page.Rotate`](https://gohugo.io/methods/page/translations/) are already sorted by weight with a fallback to lexicographical order. |
| `Site.Language.Weight` | N/A | Same as above. |
| `Site.LanguageCode` | [`Site.Language.Locale`](https://gohugo.io/methods/site/language/#locale) | This is a formal deprecation of an undocumented method. |

Although the `Weight` template methods are deprecated, you should continue to define `weight` for each language in your project configuration. It remains the primary sorting criterion for the page collections returned by [`Page.AllTranslations`](https://gohugo.io/methods/page/alltranslations/), [`Page.Translations`](https://gohugo.io/methods/page/rotate/), and [`Page.Rotate`](https://gohugo.io/methods/page/translations/).

## Deprecated configuration settings

We made symmetrical changes to project configuration settings:

| Deprecated setting | Replacement |
| --- | --- |
| `languageCode` | [`locale`](https://gohugo.io/configuration/languages/#locale) |
| `languageName` | [`label`](https://gohugo.io/configuration/languages/#label) |
| `languageDirection` | [`direction`](https://gohugo.io/configuration/languages/#direction) |

### Monolingual project example

For a monolingual project, change the `languageCode` key to `locale` at the root of your project configuration:

```toml
baseURL = 'https://example.org/'
locale = 'en-US'
title = 'Project Documentation'

```

### Multilingual project example

For a multilingual project, change the `languageCode`, `languageName`, and `languageDirection` keys to `locale`, `label`, and `direction` within each language table:

```toml
baseURL = 'https://example.org/'

defaultContentLanguage = 'de'
defaultContentLanguageInSubdir = true

[languages.de]
  direction = 'ltr'
  label = 'Deutsch'
  locale = 'de-DE'
  title = 'Projekt Dokumentation'
  weight = 1
[languages.en]
  direction = 'ltr'
  label = 'English'
  locale = 'en-US'
  title = 'Project Documentation'
  weight = 2

```

## Identify deprecated usage

Run `hugo build --logLevel info` to identify usage of the deprecated methods above. In about 3 months, the info log deprecation messages will be elevated to warnings, and about 12 months after that, they will be elevated to errors. This is in accordance with our published [deprecation process](https://gohugo.io/troubleshooting/deprecation/).
