fixes: #18123
related: #18124
Signed-off-by: GalaxySnail <me@glxys.nl>
Signed-off-by: Christian Brabandt <cb@256bit.org>
let s:ext = ""
endif
+" Choose between Chinese (Simplified) and Chinese (Traditional)
+" based on the language, suggested by Alick Zhao.
+if s:ext =~? '\.zh'
+ if s:ext =~? 'zh_tw' || (exists("s:lang") && s:lang =~? 'zh_tw')
+ let s:ext = ".zh_tw"
+ else
+ let s:ext = ".zh_cn"
+ endif
+endif
+
" 2. Build the name of the file and chapter
let s:chapter = exists("$CHAPTER") ? $CHAPTER : 1