Skip to content

-L does nothing on C/POSIX locale #187

Description

@zdimension

If the system locale is C or POSIX, then the -L flag does nothing.

On my machine, for example,

$ locale
LANG=C.UTF-8
LANGUAGE=
$ locale -a
C
C.utf8
POSIX
fr_FR.utf8

$ bash start.sh -L fr
[starts in English]
$ bash start.sh -R -L it
[starts in English]

$ LANG=fr_FR.utf8 bash start.sh -R
[starts in French]
$ LANG=fr_FR.utf8 bash start.sh -R -L fr
[starts in Italian]

Maybe the docs should be updated to indicate setting the LANG env var (or LC_MESSAGESn or LC_ALL, ...) is required for it to work.

Activity

  1. phyver commented on Sep 14, 2026

    @phyver
    Owner

    AH...
    I never completely understood how all that really worked: the difference between setting LANG, LANGUAGE or LC_MESSAGES.

    The reason -L only uses LANGUAGE is because you don't need to give the full locale name, and this is much more beginners friendly. Also, it doesn't require any corresponding locale installed on the system. It doesn't work on all systems though. (The BSDs don't use LANGUAGE if I remember correctly.)
    That it doesn't work when the current locale is C or POSIX is new to me!

    I am trying to keep the README fairly minimal. (It could go in the faq, but this is badly out of date, and I doubt anyone is actually using it.)
    Also, I want gameshell to be as close as possible to the "real" system and at least for teaching, I'd try to make sure the default locale supports UTF8 (we are in 2026) and has the appropriate language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions