### Summary

Problem detected on community.grafana collection.
The CI fails because of the following error:
```
ERROR: Ansible could not initialize the preferred locale: unsupported locale setting
```

[Link to the github actions logs](https://github.com/ansible-collections/community.grafana/runs/7376131642?check_suite_focus=true).

Edit: I edited my workflow to let all the job run and disable fail-fast. It makes it visible that issue only happens on devel:
https://github.com/ansible-collections/community.grafana/runs/7376236257?check_suite_focus=true

### Issue Type

Bug Report

### Component Name

core ?

### Ansible Version

```console
devel

(`pip install https://github.com/ansible/ansible/archive/devel.tar.gz`)
```


### Configuration

```console
N/A
```


### OS / Environment

ubuntu 20.04.4

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
On `community.grafana` collection
```yaml (paste below)
ansible-test integration -v --color --retry-on-error --requirements --python 3.8 --continue-on-error --diff --coverage
```



### Expected Results

No error related to locale.

### Actual Results

```console
ERROR: Ansible could not initialize the preferred locale: unsupported locale setting
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
"""Detect the architecture of the specified Python and return a normalized version, or None if it cannot be determined."""
    results: t.Dict[str, t.Optional[str]]
    try:
        results = detect_architecture.results  
    except AttributeError:
        results = detect_architecture.results = {}  
    if python in results:
        return results[python]
    if python == sys.executable or os.path.realpath(python) == os.path.realpath(sys.executable):
        uname = platform.uname()
    else:
        data = raw_command([python, '-c', 'import json, platform; print(json.dumps(platform.uname()));'], capture=True)[0]
        uname = json.loads(data)
    translation = {
        'x86_64': Architecture.X86_64,  
        'amd64': Architecture.X86_64,  
        'aarch64': Architecture.AARCH64,  
        'arm64': Architecture.AARCH64,  
    }
    candidates = []
    if len(uname) >= 5:
        candidates.append(uname[4])
    if len(uname) >= 6: