Skip to content

Commit

Permalink
-English switchに対応
Browse files Browse the repository at this point in the history
  • Loading branch information
YamatoSecurity committed Oct 15, 2021
1 parent b275b25 commit d725bfc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Config/Language/en.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,9 @@ function Show-Help {
Write-Host " -UTC" -NoNewline -ForegroundColor Green
Write-Host " : Output in UTC time (default is the local timezone)"

Write-Host " -English" -NoNewline -ForegroundColor Green
Write-Host " : Output in English"

Write-Host " -Japanese" -NoNewline -ForegroundColor Green
Write-Host " : Output in Japanese"

Expand Down
3 changes: 3 additions & 0 deletions Config/Language/ja.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,9 @@ function Show-Help {
Write-Host " -UTC" -NoNewline -ForegroundColor Green
Write-Host " : 時間をUTC形式で出力する。(デフォルトはローカルタイムゾーン)"

Write-Host " -English" -NoNewline -ForegroundColor Green
Write-Host " : 英語で出力する"

Write-Host " -Japanese" -NoNewline -ForegroundColor Green
Write-Host " : 日本語で出力する"

Expand Down
6 changes: 5 additions & 1 deletion WELA.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@

param (
[switch]$Japanese,
[switch]$English,
[switch]$USDateFormat,
[switch]$EuropeDateFormat,
[string]$SaveOutput = "",
Expand Down Expand Up @@ -227,7 +228,10 @@ $TotalLogs = 0

$HostLanguage = Get-WinSystemLocale | Select-Object Name # en-US, ja-JP, etc..

if ( $HostLanguage.Name -eq "ja-JP" -or $Japanese -eq $true ) {
if ( $HostLanguage.Name -eq "ja-JP" -and $English -eq $true ){
Import-Module './Config/Language/en.ps1' -Force;
}
elseif ( $HostLanguage.Name -eq "ja-JP" -or $Japanese -eq $true ) {
Import-Module './Config/Language/ja.ps1' -Force;
}
else {
Expand Down

0 comments on commit d725bfc

Please sign in to comment.