Tuesday, April 30, 2013

Using the Localized Resource Builder

Last week I had to use the localized resource builder for localizing an application for one of my clients. After searching a while I did find an article about the topic, and although it didn't meet my needs, it did point me in the right direction.

Localize with the Data Page Builder
Here's the scenario - I have a custom HTML page that has descriptive text to be localized. This is easily accomplished by adding a second data page builder (the first is for the data on the page) that points to the variable created by the localized resource builder.

Here's the HTML I used for page1:
    <head><title>Default Test Page</title></head>
            <div name="contact">
              <span name="name_label"/>
              <span name="name"></span>
              <span name="phone_label"/>
              <span name="phone"></span>
            <span name="btn"/>

and here's the default resource bundle:
button_label=click me
phone_label=Phone number:
I create a data page builder and point to the variable Variables/LocaleData created by the local resource builder:

When I run the model I get this output:

To test for French language I add a new resource bundle:
button_label=clique moi
phone_label=Numero de telephone:

and change the language to fr:
resulting in this output:

Please note that generic comments containing links with the intent of self promotion will be flagged as spam and deleted.


Post a Comment

Are you about to post a generic comment that has nothing to do with this post? Something like "Hey thanks for this very valuable information, BTW here's my website". If so, it will be marked as spam and deleted within 24 hours.

Note: Only a member of this blog may post a comment.