Documentation for Language->GetName disagrees with documentation for Language::$name

Created on 18 September 2023, over 1 year ago
Updated 19 September 2023, over 1 year ago

Problem/Motivation

The description for the language GetName function disagrees with the documentation for Language::$name.

The description for the language GetName function reads:

The human-readable name of the language (in the language that was used to construct this object).

In the documentation for the Language object, the description for Language::$name reads:

The human readable English name.

It would be good if the two descriptions were in agreement with one another, given that Language->GetName retrieves Language::$name.

Steps to reproduce

Go to the two pages in question and compare their contents.

Proposed resolution

Option 1: If name is always in English regardless of what language is the primary language for the website:

Edit language GetName function to read:

The human-readable name of the language in English.

Option 2: If name is always in the language that is the primary language of the website, for example, Swahili, if the website was initialized to use Swahili as the primary language and has content in other African languages as well.

Edit documentation for the Language object to read:

The human-readable name of the language (in the language that was used to construct this object).

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

🐛 Bug report
Status

Active

Version

10.1

Component
Documentation 

Last updated 1 day ago

No maintainer
Created by

🇺🇸United States charles belov San Francisco, CA, US

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @charles belov
  • 🇺🇸United States charles belov San Francisco, CA, US
  • 🇺🇸United States charles belov San Francisco, CA, US

    Not sure whether this would be a separate issue, but the wording of:

    (in the language that was used to construct this object)

    Is on the technical side. It is not clear from the wording that the language that was used to construct the language object is the language that the website is built in as the primary language and not either (specifically) English or the specific language.

    For example, if we have a website that was originally constructed in Danish, and the language that we are returning is Swedish, does this field refer to English, Danish or Swedish? I am guessing Danish, but I have to suss it out from the quoted language used.

    I wonder whether there is a more straightforward way to express this.

  • 🇺🇸United States charles belov San Francisco, CA, US
  • 🇮🇳India Jasjeet Kaur Brar

    Hi @Charles Belov , I am totally agree with you . As the description of both Language::$name and Language::getName functions are misleading and not completely understandable . It must be update.

Production build 0.71.5 2024