Skip to content
raulriera edited this page Sep 13, 2010 · 3 revisions

By now you should have the plugin installed and ready to go in your application. To start using it, just follow this simple steps:

Step 1:

Go though all the strings in your application that you wish to localize and wrap them the `localize`function (or `l` as as shortcut). For example: #l("Welcome to my killer app")#
Localizer will now harvest this string the next time this code runs, and it will add it to the `/plugins/Localizer/repository.cfm` file, in the format of
loc['template-where-the-string-is-located']['line-number']['string-value'] = 'string-value'

Note: When dealing with dynamic strings, such as #l("Welcome, #user.fullname# this is your dashboard")#, you will need to the special syntax of #l("Welcome, {#user.fullname#} this is your dashboard")# so that Localizer knows it should exclude that dynamic value from the repository (otherwise you will have unique strings all over the place.

Step 2:

After you have successfully wrapped all your strings, all you need to do is go through that `/plugins/Localizer/repository.cfm` file and extract it’s content into each language you want your application to support (Localizer will automactly create a file named as your current locale in that same directory. Paste the content of the repository in there and translate all the strings.

Step 3:

Repeat step #2 with all the languages you wish to support, for example: create several translations files as `/plugins/Localizer/es_ES.cfm` (Spanish, Spain), `/plugins/Localizer/en_US.cfm` (English, United States), etc.

Clone this wiki locally