Menu

Language settings and newly added languages ​​do not work

Help
xiaofo
2018-10-02
2018-10-03
  • xiaofo

    xiaofo - 2018-10-02

    I am working on a language translation. Add Simplified Chinese support based on existing traditional Chinese.
    1.When I use the language setting tool, I modify chinese language "Abbreviation for language files" setting option zh to zh-cn , it doesn't work.
    2.When I add a new language "zhuang", choose, modify "Abbreviation for language files" setting option za to zh-cn,It shows an error

    ERROR 8: Undefined index: zulu
    0 Error occurred on line 200 of file editlang_edit_settings.php
    
    Notice: Undefined index: zulu in /home/wwwroot/jiapu/editlang_edit_settings.php on line 200
    
    ERROR 8: Undefined index: zulu
    0 Error occurred on line 246 of file editlang_edit_settings.php
    
    Notice: Undefined index: zulu in /home/wwwroot/jiapu/editlang_edit_settings.php on line 246
    
    ERROR 8: Undefined index: zulu
    0 Error occurred on line 321 of file editlang_edit_settings.php
    
    Notice: Undefined index: zulu in /home/wwwroot/jiapu/editlang_edit_settings.php on line 321
    
    ERROR 8: Undefined index: zulu
    0 Error occurred on line 334 of file editlang_edit_settings.php
    
    Notice: Undefined index: zulu in /home/wwwroot/jiapu/editlang_edit_settings.php on line 334
    
    ERROR 8: Undefined index: zulu
    0 Error occurred on line 347 of file editlang_edit_settings.php
    
    Notice: Undefined index: zulu in /home/wwwroot/jiapu/editlang_edit_settings.php on line 347
    
    ERROR 8: Undefined index: zulu
    0 Error occurred on line 373 of file editlang_edit_settings.php
    
    Notice: Undefined index: zulu in /home/wwwroot/jiapu/editlang_edit_settings.php on line 373
    
    ERROR 8: Undefined index: zulu
    0 Error occurred on line 397 of file editlang_edit_settings.php
    
    Notice: Undefined index: zulu in /home/wwwroot/jiapu/editlang_edit_settings.php on line 397
    
    ERROR 8: Undefined index: zulu
    0 Error occurred on line 421 of file editlang_edit_settings.php
    
    Notice: Undefined index: zulu in /home/wwwroot/jiapu/editlang_edit_settings.php on line 421
    
    ERROR 8: Undefined index: zulu
    0 Error occurred on line 434 of file editlang_edit_settings.php
    
     

    Last edit: xiaofo 2018-10-02
  • Gerry Kroll

    Gerry Kroll - 2018-10-02

    The "Add New Language" tool has never worked properly. That's not about to change.

    To add a new language code you need to edit file /includes/lang_codes_std.php . Copy the Chinese line, and make the required changes. This language code is used internally in PhpGedView. If you want to add "zh-cn" as a new language code, you need to remove this code from the list of synonyms for "zh" at the bottom of the file.

    To add a completely new language, you need to edit file /includes/lang_settings_std.php . Edit this file in ASCII mode, otherwise the UTF-8 encoded text in this file will not copy properly. Copy the existing Chinese entries, making the necessary changes to identify the new language properly. Once this is done, you can edit the settings of the new language using the tools already built into PhpGedView. (You COULD use Notepad to do the editing in UTF-8 mode, but then you must be sure to save the resulting file as UTF-8 without BOM.)

    When editing the language settings, don't forget to remove "zh-cn" from the language code list in the Traditional Chinese definitions.

    If you wish, I can make the necessary changes, but you'll have to tell me what language code to use.

     
    • xiaofo

      xiaofo - 2018-10-02

      Thank you very much for your reply. I am also prepared to modify this, but I am not sure, so I will ask you. The language file is currently only in Traditional Chinese, there is no Simplified Chinese, if you can, please add it. Thank you!
      Currently, the Chinese code is " zh" ,recommended to be modified "zh-tw" and named Traditional Chinese. Simplified Chinese code should be "zh-cn", can be named Simplified Chinese

       
  • Gerry Kroll

    Gerry Kroll - 2018-10-03

    I'll work on this soon. The new language code will be "zh-cn", and will correspond to "Simplified Chinese". I'll be using the existing "zh" language files as a starting point. You can then make whatever changes are required in the "zh-cn" files.

    If you wish, you can improve the existing "zh" files too, but pay attention the the fact that they are supposed to be "Traditional Chinese".

    The existing "zh" code will remain but will be renamed to "Traditional Chinese". All synonyms for this code will remain in place, except for "zh-cn".

    There are too many existing PhpGedView sites that make Chinese available to their users to do anything else.

     
    • xiaofo

      xiaofo - 2018-10-03

      I have basically completed the language translation. After the proofreading is completed, I will upload both Traditional Chinese and Simplified Chinese.

       
  • Gerry Kroll

    Gerry Kroll - 2018-10-03

    Do NOT post these files to the SVN repository or here. Create two ZIP files, one for the Simplified Chinese and one for the Traditional Chinese files.

    You shoud e-mail them to me : gkroll (at) keldine (dot) ca .

     

Log in to post a comment.