1
要爲CakePHP 2.3 i18n創建默認鍋文件,在Windows中,我創建了一個像這樣的bat文件。CakePHP自動化i18n從批處理文件中提取shell進程
CD F:\mywork\app\View
F:\mywork\lib\Cake\Console\cake.bat i18n extract
但我得到這個錯誤:
Your database configuration was not found. Take a moment to create one.
---------------------------------------------------------------
Database Configuration:
---------------------------------------------------------------
Name:
[default] >
但是這裏面app\Config\database.php
文件我有數據庫的配置和他們工作得很好。所以我刪除了提取參數。
我創建了一個像這樣的新的bat文件。
CD F:\mywork\app\View
F:\mywork\lib\Cake\Console\cake.bat i18n
當我運行批處理文件,我得到這個:
[E]xtract POT file from sources
[I]nitialize i18n database table
[H]elp
[Q]uit
What would you like to do? (E/I/H/Q)
我選擇ê。我得到這個:
Current paths: None
What is the path you would like to extract?
[Q]uit [D]one
[F:\mywork\app\View\] >
我按輸入。我得到這個:
Current paths: F:\mywork\app\View\
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] >
我按輸入。我得到這個:
What is the path you would like to output?
[Q]uit
[F:\mywork\app\View\Locale] >
我貼這個:F:\mywork\app\Locale\eng\LC_MESSAGES
。 比我得到這個:
Would you like to merge all domains strings into the default.pot file? (y/n)
[n] >
我按輸入。蛋糕開始處理所有查看文件。創建pot文件。然後,我得到這個:
[E]xtract POT file from sources
[I]nitialize i18n database table
[H]elp
[Q]uit
What would you like to do? (E/I/H/Q)
我按Q和程序結束。
是否有可能自動化這個過程?預先設置路徑而不是手動選擇選項?