### Summary

I just updated to ansible core `2.12.3` via pip from ansible `2.11.9` and was confronted with weird issues during one of my plays, which tries to ensure a proper local git branch. It complained about a parsing error while navigating a git submodule path. After looking and poking around a little I found [this line of code](https://github.com/ansible/ansible/blob/0c4c18bc04c562755a368df67fce943ca15418ee/lib/ansible/modules/git.py#L546) beeing responsible for the parsing issue, as my machine uses de_DE as locale. This changes the git output from the expected `Entering <path>` to `Betrete <path>` and makes the parser fail. I did not perform a system update along to the ansible upgrade, I am sure it was working with the older ansible version (as I successfully rolled back) and the update caused the break. I see two issues here. First the parser expects english output, which might not be always provided. I tried to think about a solution, but the response of the actually invoked command `git submodule foreach` leaves no room for alternative methods of recognition. Secondly ansible seems to have used some sort of private environment where the locale must have been set to english somehow. Otherwise my play should never have worked at all. Regarding the latter case I really wonder what broke in the recent update.

### Issue Type

Bug Report

### Component Name

git

### Ansible Version

```console
$ ansible --version
ansible [core 2.12.3]

NOTE: More informations no longer available as I downgraded already to get back to a working state again.
```


### Configuration

```console
no output
```


### OS / Environment

Ubuntu 20.04.4 LTS

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
- hosts: all
  gather_facts: false
  any_errors_fatal: true
  run_once: true # Required as this runs locally
  tasks:
    - name: Perform pre-run checks
      connection: local
      block:
        # Check if local repository is on most recent commit
        - name: Checkout devops branch '{{ git_config.branch }}', force restart (abort play) if branch had to be changed
          ansible.builtin.git:
            clone: false # Do never clone, this should be run from within collection
            dest: "{{ git_config.path }}"
            repo: "{{ git_config.repo }}"
            version: "{{ git_config.branch }}"
          register: git_status
          failed_when: git_status.failed or git_status.changed # Module failure (e.g. dirty) or branch was changed/pulled
```
As long as an actual repository containing at least one submodule is given, the error will be triggered if the machine is set to a language different than english.


### Expected Results

I expected the module to ensure I am on the proper branch.

### Actual Results

```console
The module outputs the following error (abbreviated to prevent cluttering):

Unable to parse submodule hash line: Betrete 'provisioning/roles/ansible-redis'
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
cmd = [git_path, 'submodule', 'foreach', git_path, 'rev-parse', version]
    (rc, out, err) = module.run_command(cmd, cwd=dest)
    if rc != 0:
        module.fail_json(
            msg='Unable to determine hashes of submodules',
            stdout=out,
            stderr=err,
            rc=rc)
    submodules = {}
    subm_name = None
    for line in out.splitlines():
        if line.startswith("Entering '"):
            subm_name = line[10:-1]
        elif len(line.strip()) == 40:
            if subm_name is None:
                module.fail_json()
            submodules[subm_name] = line.strip()
            subm_name = None
        else:
            module.fail_json(msg='Unable to parse submodule hash line: %s' % line.strip())
    if subm_name is not None:
        module.fail_json(msg='Unable to find hash for submodule: %s' % subm_name)
    return submodules
def clone(git_path, module, repo, dest, remote, depth, version, bare,