This is a script that aimed to automatically switch locale to English when a framebuffer terminal is not available(usually due to a ill-supported graphics driver for example NVIDIA official proprietory driver that has no support for framebuffer terminal) thus can't display double-width non-ASCII CJK characters(they will be rendered as "diamond symbol" and is, definitely, not readable at all.