Index: openacs-4/packages/acs-core-docs/www/i18n-convert.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n-convert.html,v diff -u -r1.22.2.2 -r1.22.2.3 --- openacs-4/packages/acs-core-docs/www/i18n-convert.html 12 Dec 2010 00:07:02 -0000 1.22.2.2 +++ openacs-4/packages/acs-core-docs/www/i18n-convert.html 12 Dec 2010 01:37:24 -0000 1.22.2.3 @@ -1,10 +1,5 @@ -<<<<<<< i18n-convert.html - -How to Internationalize a Package

How to Internationalize a Package

Tip

-======= -How to Internationalize a Package

How to Internationalize a Package

Tip

->>>>>>> 1.24 +How to Internationalize a Package

How to Internationalize a Package

Tip

For multilingual websites we recommend using the UTF8 charset. In order for AOLserver to use utf8 you need to set the config parameters OutputCharset and @@ -77,13 +72,8 @@ test. If you don't provide the package_key argument then all packages with catalog files will be checked. The script will run its checks primarily on en_US xml catalog files. -<<<<<<< i18n-convert.html -

Avoiding common i18n mistakes

  • Replace complicated keys with longer, simpler keys. When writing in one language, it is possible to create clever code to make correct text. In English, for example, you can put an if command at the end of a word which adds "s" if a count is anything but 1. This pluralizes nouns correctly based on the data. However, it is confusing to read and, when internationalized, may result in message keys that are both confusing and impossible to set correctly in some languages. While internationalizing, watch out that the automate converter does not create such keys. Also, refactor compound text as you encounter it.

    The automated system can easily get confused by tags within message texts, so that it tries to create two or three message keys for one long string with a tag in the middle. In these cases, uncheck those keys during the conversion and then edit the files directly. For example, this code:

      <p class="form-help-text"><b>Invitations</b> are sent,
    -          when this wizard is completed and casting begins.</p>

    has a bold tag which confuses the converter into thinking there are two message keys for the text beginning "Invitations ..." where there should be one:

    Instead, we cancel those keys, edit the file manually, and put in a single temporary message tag:

      <p class="form-help-text"> <#Invitations_are_sent <b>Invitations</b> are sent, 
    -=======
    -      

Avoiding common i18n mistakes

  • Replace complicated keys with longer, simpler keys. When writing in one language, it is possible to create clever code to make correct text. In English, for example, you can put an if command at the end of a word which adds "s" if a count is anything but 1. This pluralizes nouns correctly based on the data. However, it is confusing to read and, when internationalized, may result in message keys that are both confusing and impossible to set correctly in some languages. While internationalizing, watch out that the automate converter does not create such keys. Also, refactor compound text as you encounter it.

    The automated system can easily get confused by tags within message texts, so that it tries to create two or three message keys for one long string with a tag in the middle. In these cases, uncheck those keys during the conversion and then edit the files directly. For example, this code:

      <p class="form-help-text"><b>Invitations</b> are sent,
    +      

Avoiding common i18n mistakes

  • Replace complicated keys with longer, simpler keys. When writing in one language, it is possible to create clever code to make correct text. In English, for example, you can put an if command at the end of a word which adds "s" if a count is anything but 1. This pluralizes nouns correctly based on the data. However, it is confusing to read and, when internationalized, may result in message keys that are both confusing and impossible to set correctly in some languages. While internationalizing, watch out that the automate converter does not create such keys. Also, refactor compound text as you encounter it.

    The automated system can easily get confused by tags within message texts, so that it tries to create two or three message keys for one long string with a tag in the middle. In these cases, uncheck those keys during the conversion and then edit the files directly. For example, this code:

      <p class="form-help-text"><b>Invitations</b> are sent,
               when this wizard is completed and casting begins.</p>

    has a bold tag which confuses the converter into thinking there are two message keys for the text beginning "Invitations ..." where there should be one:

    Instead, we cancel those keys, edit the file manually, and put in a single temporary message tag:

      <p class="form-help-text"> <#Invitations_are_sent <b>Invitations</b> are sent, 
    ->>>>>>> 1.24
     when this wizard is completed and casting begins.#>
       </p>

    Complex if statements may produce convoluted message keys that are very hard to localize. Rewrite these if statements. For example:

    Select which case <if @simulation.casting_type@ eq "open">and
     role</if> to join, or create a new case for yourself.  If you do not