• I cannot remove English (South Africa) from the language list at Settings -> General -> Site Language. the site was installed using the EN-ZA (English South Africa) version of WordPress some years back, but English (United States) has now been selected.

    All the .MO and .PO files in wp-content/languages and sub-directories were deleted but that didn’t remove English (South Africa), so all the JSON and any other files in the tree have been deleted and still English (South Africa) is listed in Settings -> General -> Site Language.

    How does one remove all traces of a language and use the default language settings? Where else do language options and settings reside for WordPress, themes and plugins?

    • This topic was modified 14 hours, 48 minutes ago by phonyroyal.
Viewing 3 replies - 1 through 3 (of 3 total)
  • franrival

    (@franrival)

    English -South Africa- isn’t being “loaded” from files anymore, it’s stored in the database and WordPress language registry, not just in /wp-content/languages.

    You need to check in database., If you see: en_ZA – Change it to: en_US.

    wp-config.php > define(‘WPLANG’, ‘en_ZA’); -to- define(‘WPLANG’, ‘en_US’); 🙌

    Thread Starter phonyroyal

    (@phonyroyal)

    Thanks, but there’s no language line in wp-config.phpd despite the comment at the top that says:

    This file contains the following configurations: Localized language

    Shouldn’t the EN-ZA database entries rather be deleted than renamed? Aren’t these orphaned entries?

    Is there any manual process to fully delete a language? I’m sure there used to be a Delete option in the General drop-down language list some years back.

    Moderator threadi

    (@threadi)

    You must delete all files with this structure:

    Language_Code.mo

    admin-Language_Code.mo

    admin-network-Language_Code.mo

    continents-cities-Language_Code.mo

    admin-Language_Code.l10n.php

    admin-network-Language_Code.l10n.php

    continents-cities-Language_Code.l10n.php

    Language_Code.l10n.php

    For en_za it should be these files:

    en_za.mo

    admin-en_za.mo

    admin-network-en_za.mo

    continents-cities-en_za.mo

    admin-en_za.l10n.php

    admin-network-en_za.l10n.php

    continents-cities-en_za.l10n.php

    en_za.l10n.php

    If even one of them remains, WordPress will continue to recognize it as a locally available language.

    The JSON files play no role in this recognition, nor do the .po files. I would still recommend deleting them as well, since otherwise they will just sit around as unused files on your hosting server.

    Source: https://github.com/WordPress/WordPress/blob/master/wp-includes/l10n.php#L1473

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.