-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v1.0.8 read language-codes from ini file
- Loading branch information
Showing
4 changed files
with
110 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
[LANGUAGES] | ||
1=zh_TW | ||
2=zh_CN | ||
3=en_US | ||
count=11 | ||
|
||
; number=LanguageCode LanguageDescription | ||
; How to get the required language code? | ||
; 1. Execute cmd.exe | ||
; 2. cd autosub | ||
; 3. autosub.exe -lsc | ||
[zh_TW] | ||
1=zh-TW 中文(繁體) | ||
2=zh-CN 中文(簡體) | ||
3=en-US English | ||
4=ja-JP 日本語 | ||
5=ko-KR 한국어 | ||
6=yue-hant-hk 粵語 | ||
7=fr-fr French(法語) | ||
8=tr-tr Turkish (土耳其語) | ||
9=ru-ru Russian (俄語) | ||
10=es-es Spanish (西班牙語) | ||
11=it-it Italian (義大利語) | ||
|
||
[zh_CN] | ||
1=zh-TW 中文(繁体) | ||
2=zh-CN 中文(简体) | ||
3=en-US English | ||
4=ja-JP 日本语 | ||
5=ko-KR 한국어 | ||
6=yue-hant-hk 粤语 | ||
7=fr-fr French(法语) | ||
8=tr-tr Turkish (土耳其语) | ||
9=ru-ru Russian (俄语) | ||
10=es-es Spanish (西班牙语) | ||
11=it-it Italian (意大利语) | ||
|
||
[en_US] | ||
1=zh-TW Chinese(Traditional) | ||
2=zh-CN Chinese(Simplified) | ||
3=en-US English | ||
4=ja-JP Japanese | ||
5=ko-KR Korean | ||
6=yue-hant-hk Hong Kong | ||
7=fr-fr French(France) | ||
8=tr-tr Turkish (Turkey) | ||
9=ru-ru Russian (Russia) | ||
10=es-es Spanish (Spain) | ||
11=it-it Italian (Italy) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
; https://autohotkey.com/board/topic/33506-read-ini-file-in-one-go/ | ||
|
||
ReadIni( filename = 0 ) | ||
; Read a whole .ini file and creates variables like this: | ||
; %Section%%Key% = %value% | ||
{ | ||
Local s, c, p, key, k | ||
|
||
if not filename | ||
filename := SubStr( A_ScriptName, 1, -3 ) . "ini" | ||
|
||
FileRead, s, %filename% | ||
|
||
Loop, Parse, s, `n`r, %A_Space%%A_Tab% | ||
{ | ||
c := SubStr(A_LoopField, 1, 1) | ||
if (c="[") | ||
key := SubStr(A_LoopField, 2, -1) | ||
else if (c=";") | ||
continue | ||
else { | ||
p := InStr(A_LoopField, "=") | ||
if p { | ||
k := SubStr(A_LoopField, 1, p-1) | ||
%key%%k% := SubStr(A_LoopField, p+1) | ||
} | ||
} | ||
} | ||
} |