Pages

2021年5月22日土曜日

[CakePHP4] 翻訳ファイルの作成まで

翻訳辞書ファイル(.po)を作成するまでの手順

PS D:\prj\example.com\www.example.com> ./bin/cake i18n
I18n Shell
-------------------------------------------------------------------------------
[E]xtract POT file from sources
[I]nitialize a language from POT file
[H]elp
[Q]uit
What would you like to do? (E/I/H/Q)
> E
Current paths: None
What is the path you would like to extract?
[Q]uit [D]one
[D:\prj\example.com\www.example.com\src\] >

Current paths: D:\prj\example.com\www.example.com\src\
What is the path you would like to extract?
[Q]uit [D]one
[D:\prj\example.com\www.example.com\templates\] >

Current paths: D:\prj\example.com\www.example.com\src\, D:\prj\example.com\www.example.com\templates\
What is the path you would like to extract?
[Q]uit [D]one
[D] >

Would you like to extract the messages from the CakePHP core? (y/n)
[n] > y
What is the path you would like to output?
[Q]uit
[D:\prj\example.com\www.example.com\resources\locales\] >


Extracting...
-------------------------------------------------------------------------------
Paths:
   D:\prj\example.com\www.example.com\src\
   D:\prj\example.com\www.example.com\templates\
   D:\prj\example.com\www.example.com\vendor\cakephp\cakephp\src\
Output Directory: D:\prj\example.com\www.example.com\resources\locales\
-------------------------------------------------------------------------------
==========================================================================> 100%
default.pot is unchanged. Skipping.
cake.pot is unchanged. Skipping.

Done.

ここまでで .po ファイルの雛形となる .pot ファイルが作成される。

What would you like to do? (E/I/H/Q)
> I
Please specify language code, e.g. `en`, `eng`, `en_US` etc.
> ja_JP
What folder?
[D:\prj\example.com\www.example.com\resources\locales\] >

.po が ja_JP 以下に作成される。

0 件のコメント:

コメントを投稿

Followers