Skip to content

언어 별로 프로그램 설명 추가하기. #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bamjun opened this issue Jun 16, 2024 · 0 comments
Open

언어 별로 프로그램 설명 추가하기. #3

bamjun opened this issue Jun 16, 2024 · 0 comments

Comments

@bamjun
Copy link
Owner

bamjun commented Jun 16, 2024

아무래도 영어를 알고 있다고 하더라도 모국어로 봐야 눈에 잘들어오기때문에, 윈도우 언어 설정에 때라서 설명이 해당언어로 돼어있으면 좋을꺼같다..

배쉬 쉘에서 현재 사용 중인 윈도우의 언어 설정을 확인하려면, Windows 환경 변수 또는 시스템 정보를 조회하는 명령을 사용할 수 있습니다. 다음은 배쉬 쉘을 사용하여 이 정보를 확인하는 방법입니다:

PowerShell을 사용한 방법

  1. PowerShell을 사용하여 시스템 언어 확인:
    PowerShell 명령을 사용하여 Windows 시스템 언어를 조회할 수 있습니다.
#!/bin/bash

# PowerShell 명령을 실행하여 Windows 시스템 언어를 조회합니다.
LANGUAGE=$(powershell.exe -Command "Get-WinSystemLocale | Select-Object -ExpandProperty Name")
echo "Current Windows Language: $LANGUAGE"

이 스크립트는 PowerShell 명령을 실행하여 시스템 로케일 정보를 가져오고, 그 중에서 언어 정보를 추출하여 출력합니다.

WMIC를 사용한 방법

  1. WMIC (Windows Management Instrumentation Command-line):
    WMIC 명령을 사용하여 시스템 언어 정보를 확인할 수도 있습니다.
#!/bin/bash

# WMIC 명령을 사용하여 Windows 언어 정보를 조회합니다.
LANGUAGE=$(cmd.exe /c "wmic os get locale | findstr /v Locale")
echo "Current Windows Language: $LANGUAGE"

이 스크립트는 WMIC 명령을 실행하여 시스템 언어 정보를 조회하고, 그 결과를 출력합니다. WMIC 명령은 시스템의 다양한 설정 정보를 조회할 수 있는 강력한 도구입니다.

예제 출력

스크립트를 실행하면 다음과 같은 출력이 나타납니다:

  • ko-KR (한국어)
  • en-US (영어)
  • zh-CN (중국어)

이 두 가지 방법 중 하나를 사용하여 배쉬 쉘에서 현재 사용 중인 윈도우의 언어 설정을 확인할 수 있습니다. 스크립트를 실행할 때는 PowerShell 또는 CMD를 호출하여 필요한 정보를 추출하는 것을 잊지 마세요.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant