provide-free-support Ujjwal's Blog: Internationalization in Demandware

Thursday, October 17, 2013

Internationalization in Demandware

i18n / internationalization

Although internationalization (or i18n for short) covers a number of different aspects, its primaryrole is to provide pages in multiple languages. To ensure this can be achieved, one should never include language-specific text in a template or controller directly. Instead of this, one should use the Demandware property mechanism. As familiar from languages such as Java, this permits thedefinition of entities known as "property" files, which assign the actual language-specific texts to unique keys. Since Demandware loads all property files automatically, this means you always have access to the keys of all property files.

Instead of using the Resource class from Demandware, you should utilize the i18n method provided by the framework. This offers a few extensions that, among other things, permit the utilization of property file content in frontend JavaScript functions.
Sample property file ("user.properties"):

user.profile.complete.head=Complete Your Profile
user.profile.complete.promo=What is this?
user.profile.complete.buttons.next=Next

Cheers,

Ujjwal Soni

1 comment:

s said...

Using Resource class doesn't harm in any way. Based on the locales, if you have locale specific property files then it will automatically grab the text based on the locale.

best-it-exam-    | for-our-work-    | hottst-on-sale-    | it-sale-    | tast-dumps-us-    | test-king-number-    | pass-do-it-    | just-do-it-    | pass-with-us-    | passresults-everything-    | passtutor-our-dumps-    | realtests-us-exam-    | latest-update-source-for-    | cbtnuggets-sale-exam    | experts-revised-exam    | certguide-sale-exam    | test4-sale-exam    | get-well-prepared-    | certkiller-sale-exam    | buy-discount-dumps    | how-to-get-prepared-for-the    | in-an-easy-way    | brain-dumps-sale    | with-pass-exam-guarantee    | accurate-study-material    | at-first-try    | 100%-successful-rate    | get-certification-easily    | material-provider-exam    | real-exam-practice    | with-pass-score-guarantee    | certification-material-provider    | for-certification-professionals    | get-your-certification-successfully    | 100%-Pass-Rate    | in-pdf-file    | practice-exam-for    | it-study-guides    | study-material-sku    | study-guide-pdf    | prep-guide-demo    | certification-material-id    | actual-tests-demo    | brain-demos-test    | best-pdf-download    | our-certification-material    | best-practice-test    | leading-provider-on    | this-course-is-about    | the-most-reliable    | high-pass-rate-of    | high-pass-rate-demo    | recenty-updated-key    | only-for-students-free-download    | courseware-plus-kit-for    | accurate-answers-of    | the-most-reliable-id    | provide-training-for    | welcome-to-buy    | material-for-success-pass    | provide-free-support    | best-book-for-pass    | accuracy-of-the-answers    | pass-guarantee-id    | pass-exam-key    | pass-sku-id    | study-for-exid    | pdf-sku-exid    | sku-pdf-id    | pdf-demo-key    | exam-demo-ske    | pass-it-dump    |
http://www.menuiserie-dauvergne.com/    | http://www.menuiserie-dauvergne.com/    |