Tools JSON Viewer QRCode Generator
yamaokaです。最近、PHPのフレームワークのsymfonyをいじっています。 symfonyでメッセージの国際化を行う場合、 デフォルトではXLIFFの形式を使うようになっています。 その他、gettextやデータベースからメッセージリソースを取得できるようにもなっているのですが、 その方法があまり公開されていません。 今回はgettextを利用してメッセージの国際化を行う方法を紹介します。 gettextに関する基本的な情報については、 Wikipediaの該当項目や ウノウラボの過去記事 などを参考にどうぞ。実際の動作はsymfony 1.0.8で確認しています。 apps/<yourapp>/config/settings.ymlに下記を追記 all: .settings: i18n: on # 国際化を有効に standard_helpers: [I18N] # ヘルパーとし
symfony.jp 2020 Copyright. All Rights Reserved. The Sponsored Listings displayed above are served automatically by a third party. Neither the service provider nor the domain owner maintain any relationship with the advertisers. In case of trademark issues please contact the domain owner directly (contact information can be found in whois). Privacy Policy
symfony.jp 2020 Copyright. All Rights Reserved. The Sponsored Listings displayed above are served automatically by a third party. Neither the service provider nor the domain owner maintain any relationship with the advertisers. In case of trademark issues please contact the domain owner directly (contact information can be found in whois). Privacy Policy
はじめに 本連載では、PHP上で動作するアプリケーションフレームワーク「symfony」でアプリケーション開発を行う方法について紹介します。前回はビューの断片化や、ルーティング、キャッシュコントロールについて紹介しました。今回は国際化機能、プラグインの使用などについて紹介します。対象読者 PHPの基本構文は一通り理解しているが、フレームワークを利用したことはないという方を対象としています。必要な環境 symfonyはPHP5とWebサーバがインストールされている環境で利用可能です。本連載ではWebサーバとしてApache 2.2を、OSにWindows XPを、データベースとしてMySQLを用いています。以下に、本連載でアプリケーション作成/動作確認に用いている環境を示します(インストールにあたっては最新安定版の使用を推奨します)。各項目の詳細なインストール手順は、「サーバサイド技術の学び
symfony.jp 2020 Copyright. All Rights Reserved. The Sponsored Listings displayed above are served automatically by a third party. Neither the service provider nor the domain owner maintain any relationship with the advertisers. In case of trademark issues please contact the domain owner directly (contact information can be found in whois). Privacy Policy
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く