Fork me on GitHub

Nubel 0.3 - unable to translate /languague/eng/global.php  Bottom

  • I have discovered a problem using Nubel 0.3. I am not sure if this is a bug, but it is definately a problem. The error message I got is:

    Parse error: parse error in /language/chi/global.php on line 71
    (When I counted the lines, this lines refers to the CHARSET)

    I made UTF-8 the default encoding in PN by changing CHARSET in /language/eng/global.php. I was able to use Nubel to translate a few modules and the theme without a problem; everything showed up correctly. The problem happened when I am translating this particular file.

    html/language/eng/global.php into
    html/language/chi/global.php

    CHI is not one of the default languages; however, I was able to add it to PN language list by using the following steps.

    Added $lang['chi'] = _LANGUAGE_CHI;
    to html/modules/NS-Languages/api.php
    Add define('_LANGUAGE_CHI','Traditional Chinese');
    to all html/language/<languages>/global.php files.

    To make sure everything works, I first simply change the language to Traditional Chinese right after I copied "eng" to "chi". Since /chi/global.php was copied directly from /eng/global.php, no errors were found. Everything showed up in English at this point.

    Then I login as Admin and launched Nubel and selected to translate English into Traditional Chinese. After Nubel opens the usual screen where I would do the translation, I did not change anything and I clicked submit right away. Then I tried to change the language to Traditional Chinese in the home page and the parse error showed up.

    I am just curious, is Nubel able to translate the /language/eng/global.php into other languages properly?

    PS. If I ignored the error message and I start with the translation non the less, after translating about the first 150 items, some how I would get parse error on line 141 instead of line 71.

    Would this error go away if I finish translating everything? (There are about 2000 terms in this /language/eng/global.php alone; therefore, I would definately appreciate some comments on this before I blindly go ahead to try finish up the rest of the 1850 terms.)

    Or maybe should I use an UTF-8 editor to translate this particular file?

    Any suggestions? Thanks!!

    Gulpy</languages>
  • Mistery Solved!!

    I discovered that the problem was caused by single quotation vs. double quotation.

    Once I changed the single quotation ( ' ) to double quotation ( " ), the parse error went away!! I am not sure if this problem only happens when using Nubel with UTF-8 encoding.

    Anyways, if you are using Nubel and you also faced the same error message, please try to change the quotation mark to a double quote and see if that helps.

    Gulpy

This list is based on users active over the last 60 minutes.