Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language ≠ Country (Change the default language in the CMS from "en-GB" to "en") #28197

Closed
universewrld opened this issue Mar 3, 2020 · 17 comments

Comments

@universewrld
Copy link

Is your feature request related to a problem? Please describe.

At the present time, when installing Joomla, the standard website language for the UK is also installed (not English language, but English language for the country - UK)

This creates a problem for anyone who wants to make a website for users who understand English but do not have a specific country.

For example, if the main audience of your website is in the USA, then you will need to install another English language (en-US), or change the language code through the plugin (System - Language Code). This does not help much, since website users and editors will still see the code (en-GB) in their user settings and in the Control Panel, as well as third-party extensions will use this language.

The same problem appears with other languages. For example, people know the Russian language not only in Russia (ru-RU), but in many other countries of the world (Ukraine, Belarus, Kazakhstan and other countries of the former USSR).

Describe the solution you'd like

I suggest the following changes for language files starting with Joomla 4.0 (so far the CMS is not even beta yet):

  1. Make the default default language - English (en), instead of the UK country (en-GB).
  2. In all languages, remove the country prefix and leave only the language code. (ru instead of ru-RU, de instead of de-DE, etc.)
  3. For all new sites on Joomla 4.0, only one language will be installed by default - en (the user will be able to choose others if necessary).
  4. For backward compatibility with Joomla 3, on websites that were created before Joomla 4.0 when migrating to Joomla 4.0, all previously installed languages ​​will be saved (en-GB etc.), and the main language will be installed - en. After migration from Joomla 3.0 to Joomla 4.0, each website administrator will be able to delete the language (en-GB), and instead the standard language will remain (en). Currently, it is not possible to delete a language (en-GB) if, for example installed (en-US).
  5. Each website administrator will be able to create new languages ​​in the Control Panel. First, a field with a language will be selected, and after that, a field with the name of the country will be selected (for example: en-RU - English langauge in the country of Russia). This will help websites such as the official embassy of the country, online stores with local points of sale, etc.

All languages that have a country code will also be available for download and installation in Joomla 4.0 (en-GB, ru-RU, de-DE etc), but in addition languages without a country name (en, ru, de) will also be available for installation. The default language is en, without a country name.

Since the beta version of Joomla 4.0 has not yet been released, I suggest making these changes.

Additional context

More info on this from Google Help:

Managing multi-regional and multilingual sites

If your site offers different content to users in different languages, countries, or regions, you can optimize Google Search results for your site.

Background:

  • A multilingual website is any website that offers content in more than one language. For example, a Canadian business with English and French versions of its site. Google Search tries to find pages that match the language of the searcher.
  • A multi-regional website is one that explicitly targets users in different countries. For example, a product manufacturer that ships to both Canada and the United States. Google Search tries to find the right locale page for the searcher.

Some sites are both multi-regional and multilingual: for example, a site might have different versions for the USA and for Canada, and both French and English versions of the Canadian content.

Example

Example Widgets, Inc has a website that serves users in the USA, Great Britain, and Germany. The following URLs contain substantially the same content, but with regional variations:

Note that the language-specific subdomains in these URLs (en, en-gb, en-us, de) are not used by Google to determine the target audience for the page; you must explicitly map the target audience.

Here is the HTML that should be pasted into the section of all the pages listed above. It would direct US, UK, generic English speakers, and German speakers to localized pages, and all others to a generic homepage. Google Search returns the appropriate result for the user, according to their browser settings.

<head>
  <title>Widgets, Inc</title>
  <link rel="alternate" hreflang="en-gb"
        href="http://en-gb.example.com/page.html" />
  <link rel="alternate" hreflang="en-us"
        href="http://en-us.example.com/page.html" />
  <link rel="alternate" hreflang="en"
        href="http://en.example.com/page.html" />
  <link rel="alternate" hreflang="de"
        href="http://de.example.com/page.html" />
  <link rel="alternate" hreflang="x-default"
        href="http://www.example.com/" />
</head>
@universewrld
Copy link
Author

@infograf768 @richard67 What do you think of this if you use a language code without a country code? (but also retain the ability to install those languages that were available for Joomla 3.0)

@universewrld
Copy link
Author

I know that there is a plugin System - Language Code with which you can change the prefix, but this plugin does not solve this problem: now it is impossible to remove the language en-GB and leave only the language en or en-US.

@brianteeman
Copy link
Contributor

There is not one English language. It would be totally wrong to rename the current en-GB and use it in the USA.

@Quy
Copy link
Contributor

Quy commented Mar 3, 2020

See PR #12014 to see if it is applicable.

@universewrld
Copy link
Author

This problem with the country code even on the official Joomla.org website:

изображение

@brianteeman
Copy link
Contributor

Not true

@universewrld
Copy link
Author

There is not one English language. It would be totally wrong to rename the current en-GB and use it in the USA.

English is used in several countries (GB, US, CA, IR, NZ, AU), as well as Russian (RU, UA, BE, KZ).

Need the ability to install this language without a country code (en, ru). Other popular websites have English without a country code (as the default language) and a language with a country code (if the website content is for a specific country).

@richard67
Copy link
Member

On my website I use the language code plugin so that I have language codes only. The browser then can select en if it’s language is en-US and so will get the British English and not the German version of my site. This is what the plugin is made for, and it is sufficient and correct, Google webmaster tools tell me all language tags on my site are correct.

@richard67
Copy link
Member

@sanek4life your suggestions in the description are definitely wrong!

@brianteeman
Copy link
Contributor

I am going to close this. As already stated there is more than one english language and it would be incorrect to just use one (although of course I would prefer it if the world spoke real english)

@mbabker
Copy link
Contributor

mbabker commented Mar 3, 2020

Per the specification (see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang as a reliable source), it is perfectly valid to set the lang attribute inside a HTML tag to either a language tag (i.e. "en") or a region tag (i.e. "en-GB"). There is no need to change how Joomla works in this regard.

(Edit: Also, since you want to say Joomla is "wrong", please look at the https://downloads.joomla.org site where multiple region locales of a language are actively used, such as US and GB English, or French and its Canadian locale; so it is proper to use the region tags and not blindly strip them because you don't like them)

@universewrld
Copy link
Author

Per the specification (see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang as a reliable source), it is perfectly valid to set the lang attribute inside a HTML tag to either a language tag (i.e. "en") or a region tag (i.e. "en-GB"). There is no need to change how Joomla works in this regard.

(Edit: Also, since you want to say Joomla is "wrong", please look at the https://downloads.joomla.org site where multiple region locales of a language are actively used, such as US and GB English, or French and its Canadian locale; so it is proper to use the region tags and not blindly strip them because you don't like them)

изображение

ISO 639 Language Codes

ISO 639-6:2009 en
Codes for the representation of names of languages—Part 6: Alpha-4 code for comprehensive coverage of language variants

Source: http://www.infoterm.info/standardization/ISO_639.php

I do not want to divide users from different English-speaking countries. I do not know 10 variants of the English language, I know only one version of the English language (I am not from an English-speaking country). And my website is not regional, I do not sell anything in the UK or the USA, I provide information to users around the world who know English.

It’s also good for SEO, which even Google says: https://support.google.com/webmasters/answer/189077

Supported language/region codes

The value of the hreflang attribute identifies the language (in ISO 639-1 format) and optionally a region (in ISO 3166-1 Alpha 2 format) of an alternate URL. (The language need not be related to the region.) For example:

  • de: German language content, independent of region
  • en-GB: English language content, for GB users
  • de-ES: German language content, for users in Spain

⚠️ Do not specify a country code by itself. Google does not automatically derive the language from the country code. You can specify a language code by itself if you want to simplify your labeling. Adding the country code after the language to restrict the page to a specific region.

Examples:

  • be: Belarusian language, independent of region (not Belgium French)
  • nl-be: Dutch for Belgium
  • fr-be: French for Belgium

For language script variations, the proper script is derived from the country. For example, when using zh-TW for users in Taiwan, the language script is automatically derived (in this example: Chinese-Traditional). You can also specify the script itself explicitly using ISO 15924, like this:

  • zh-Hant: Chinese (Traditional)
  • zh-Hans: Chinese (Simplified)

Alternatively, you can also specify a combination of script and region—for example, use zh-Hans-TW to specify Chinese (Simplified) for Taiwanese users.

@universewrld
Copy link
Author

I am going to close this. As already stated there is more than one english language and it would be incorrect to just use one (although of course I would prefer it if the world spoke real english)

One way or another, even the documentation for The Open Graph protocol says the following:

Optional Metadata

The following properties are optional for any object and are generally recommended:

  • og:locale - The locale these tags are marked up in. Of the format language_TERRITORY. Default is en_US.

Source: https://ogp.me/

Joomla now uses language en-GB by default, but all over the world it is language en-US. Is this possible if the main language when installing Joomla is en-US? Or will it be possible to remove the language en-GB to leave only en-US? It is currently not possible to remove language en-GB:

изображение

@brianteeman
Copy link
Contributor

You cannot remove the default language as this is needed to provide text if your extension or language pack is not completed in your language.

If you dont want the meta language to say en-GB then just change it to en in the plugin - that is exactly why the plugin is shipped.

@universewrld
Copy link
Author

You cannot remove the default language as this is needed to provide text if your extension or language pack is not completed in your language.

If you dont want the meta language to say en-GB then just change it to en in the plugin - that is exactly why the plugin is shipped.

изображение

My settings:

изображение

изображение

And users can still see the name of the country in the settings of their profile on the website:

изображение

Is there any way that only the language can be seen everywhere, without the name of the country?

@universewrld
Copy link
Author

@sanek4life your suggestions in the description are definitely wrong!

изображение

In this field I can’t change tag en-GB to tag en. Therefore, I suggested adding the language en and ru (& others) so that you can specify the language en and ru in the settings

изображение

@infograf768
Copy link
Member

Once and for all, Joomla will not deal with language tags without a Country Code.
Use the plugin if you need/prefer to.
This topic goes nowhere. I’m locking this now

@joomla joomla locked and limited conversation to collaborators Mar 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants