Windowsで始めるCakePHP4

CakePHP4のメモ

161 views

以下を実行する。

bin\cake i18n extract

以下のように回答していく。

c:\xampp\htdocs\cakeblog>bin\cake i18n extract
Current paths: None
What is the path you would like to extract?
[Q]uit [D]one
[C:\xampp\htdocs\cakeblog\src\] >Enter(QでもDでもない)

Current paths: C:\xampp\htdocs\cakeblog\src\
What is the path you would like to extract?
[Q]uit [D]one
[C:\xampp\htdocs\cakeblog\templates\] >Enter(QでもDでもない)

Current paths: C:\xampp\htdocs\cakeblog\src\, C:\xampp\htdocs\cakeblog\templates\
What is the path you would like to extract?
[Q]uit [D]one
[D] >Enter(QでもDでもない)

Would you like to extract the messages from the CakePHP core? (y/n)
[n] >Enter(QでもDでもない)
What is the path you would like to output?
[Q]uit
[C:\xampp\htdocs\cakeblog\resources\locales\] >Enter(QでもDでもない)


Extracting...
-------------------------------------------------------------------------------
Paths:
   C:\xampp\htdocs\cakeblog\src\
   C:\xampp\htdocs\cakeblog\templates\
Output Directory: C:\xampp\htdocs\cakeblog\resources\locales\
-------------------------------------------------------------------------------
==========================================================================> 100%

Done.

実行するとresources/cake.potとresources/default.potが作成される。
default.potをresource/locales/ja_JPの下にコピーする。
ファイル名はdefault.potからdefault.poに変更する。

次にconfig/app.phpに20行目を追記する。

    'App' => [
        'namespace' => 'App',
        'encoding' => env('APP_ENCODING', 'UTF-8'),
        'defaultLocale' => env('APP_DEFAULT_LOCALE', 'en_US'),
        'defaultTimezone' => env('APP_DEFAULT_TIMEZONE', 'UTC'),
        'base' => false,
        'dir' => 'src',
        'webroot' => 'webroot',
        'wwwRoot' => WWW_ROOT,
        //'baseUrl' => env('SCRIPT_NAME'),
        'fullBaseUrl' => false,
        'imageBaseUrl' => 'img/',
        'cssBaseUrl' => 'css/',
        'jsBaseUrl' => 'js/',
        'paths' => [
            'plugins' => [ROOT . DS . 'plugins' . DS],
            'templates' => [ROOT . DS . 'templates' . DS],
            'locales' => [RESOURCES . 'locales' . DS],
        ],
        'defaultLocale' => env('APP_DEFAULT_LOCALE', 'ja_JP'),
    ],

Page 11 of 17.

前のページ 次のページ



[添付ファイル]

1.php_xdebug-3.0.4-8.0-vs16-x86_64.dll  


お問い合わせ

プロフィール

マッスル

自己紹介

本サイトの作成者。
趣味:プログラム/水耕栽培/仮想通貨/激辛好き
プログラムは趣味と勉強を兼ねて、のんびり本サイトを作っています。
フレームワークはdjango。
仮想通貨はNEMが好き。
水耕栽培は激辛好きが高じて、キャロライナ・リーパーの栽培にチャレンジ中。

サイト/ブログ

https://www.osumoi-stdio.com/pyarticle/

ツイッター

@darkimpact0626