5年以上経過した古い記事です(Joomla2.5)
日本語の「月」表示には重複部分があります。
サイト → language → ja-JP → ja-JP.ini
------------------中略------------------ JANUARY_SHORT="1月" JANUARY="1月" FEBRUARY_SHORT="2月" FEBRUARY="2月" MARCH_SHORT="3月" MARCH="3月" APRIL_SHORT="4月" APRIL="4月" MAY_SHORT="5月" MAY="5月" JUNE_SHORT="6月" JUNE="6月" ------------------中略------------------
この様にフルスペルとショートスペルの部分が同じ表示に翻訳されています。 phpで日付取得の際に「F」でも「M」でも共に同じ表示になります。利用するテンプレートの仕様にも寄りますが、片方を別の表記にして使う方が効率が良い場合もあります。 例えば、サイトのデザインに合わせて「1月」「2月」では無く「睦月」「如月」と表現したい時や英文表記の「Jan」「Feb」にしてみたり、色々と用途は考えられますが利用するテンプレートであまり使われていない方を書き換えて、PHPのテンプレートで読み込む際に「F」または「M」を使い分ければ便利に使えます。
※ページ単位やカテゴリー単位では利用出来ません。サイト全体に影響が有りますから、導入にはご注意ください。
導入はオーバーライドで
「ja-JP.ini」を直接変更してしまうと言語のアップグレードの際に元に戻ってしまいますので、必ずオーバーライドを使いましょう。
※あくまで、現時点で「月表示」の部分だけです。今後Joomlaの仕様変更や翻訳の変更で変わる場合があります。
We use cookies and similar technologies to improve your experience on our website.
This website uses cookies and similar technologies. They are grouped into categories, which you can review and manage below. If you have accepted any non-essential cookies, you can change your preferences at any time in the settings.
These technologies are required to activate the core functionality of our website.
These technologies allow our website to remember your preferences and provide you with a more personalized experience.
These technologies enable us to analyse the use of our website in order to measure and improve performance.
These technologies are used by our marketing partners to show you personalized advertisements relevant to your interests.