Add new locale folder structure and symlinks for old lang layout

This commit is contained in:
Clemens Schwaighofer
2022-04-12 14:25:19 +09:00
parent 5a81626e8c
commit 330e2baf39
13 changed files with 60 additions and 2 deletions

52
4dev/locale/Readme.md Normal file
View File

@@ -0,0 +1,52 @@
# Translation files
## Source file name convetion
Locale Name . Domain . Encoding .po
## Name parte explenations
### Locale Name Examples
If underscore in name the long version is checked first, then the short version:
en_US@latin -> en_US -> en
* en
* en_US
* en_US@latin
### Domain
For current case auto set CONTENT_PATH is used
* admin
* frontend
### Encoding
if not set UTF-8 is assumed. Any other utf8 encoding is changed to UTF-8
* UTF-8
* SJIS
* EUC
## File name example source
`ja_US.admin.UTF-8.po`
## Folder layout
`includes/locale/ja/LC_MESSAGES/frontend.mo`
ALTERNATE LOCALE NAMES:
* ja
* ja_JP
* ja.UTF-8
* ja_JP.UTF-8
ja_JP.UTF-8: Locale Name
frontend: dmain (CONTENT_PATH)
## command
`msgfmt -o www/includes/locale/ja_JP/LC_MESSAGES/frontend.UTF-8.mo 4dev/lang/ja_US.admin.UTF-8.po`

View File

@@ -26,7 +26,7 @@ msgid "Month"
msgstr "Month"
msgid "INPUT TEST"
msgstr "OUTPUT TEST EN"
msgstr "OUTPUT TEST ADMIN EN"
msgid "I should be translated"
msgstr "I should be translated: I WAS TRANSLATED"

View File

@@ -0,0 +1,2 @@
msgid "INPUT TEST"
msgstr "OUTPUT TEST FRONTEND EN"

View File

@@ -63,7 +63,7 @@ msgid "Sun"
msgstr "日"
msgid "INPUT TEST"
msgstr "OUTPUT TEST JA"
msgstr "OUTPUT TEST ADMIN JA"
# login string
msgid "Hello %s"

View File

@@ -0,0 +1,2 @@
msgid "INPUT TEST"
msgstr "OUTPUT TEST FRONTEND JA"

Binary file not shown.

View File

@@ -0,0 +1 @@
../../locale/en_US/LC_MESSAGES/admin.mo

Binary file not shown.

View File

@@ -0,0 +1 @@
../../locale/ja/LC_MESSAGES/admin.mo

View File

@@ -0,0 +1 @@
../../locale/en_US/LC_MESSAGES/frontend.mo

View File

@@ -0,0 +1 @@
../../locale/ja/LC_MESSAGES/frontend.mo

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.