WebCards Support Forums

WebCards Support Forums » General Support Requests

Default public language

(7 posts)
  • Started 8 months ago by Lufrutta
  • Latest reply from corbyboy

No tags yet.

  1. Lufrutta
    Member

    I would like to have WebCards translated to German. So I copied en-gb.php to de-fo.php and to de-in.php. I'd like to have the formal and the informal German translation. (For a first try I just translated line 148 $lang['choose_img'] = "Choose an Image to Send with Your {{site_title}}"; to get a quick result in the front end) I also changed line 2 to $lang['xml_format'] = "de"; and line 3 to $lang['charset'] = "utf-8";

    I also made a view changes to lang_conf.php in the directory lang. So the content is now:
    <?php
    $lang_array['en-gb'] = "English (British)";
    $lang_array['de-fo'] = "Deutsch (formell)";
    $lang_array['de-in'] = "Deutsch (informell)";
    ?>

    Now I'm able to choose the 2 additional languages in the Administration Center but a change will not appear in the front end. I run task manager, I rebuilt the chache but it does not work.

    Is there anything else to be done?

    Posted 8 months ago #
  2. corbyboy
    Key Master

    This was an error I was not aware of. Here is how to fix it.

    Open up index.php and about line 77 find this section:

    if($conf['allow_langs'] == "n") //If changing languages is disabled the user must use the default language
    {
    $lang_dir = $conf['default_pub_lang'];
    }
    $lang_dir = file_exists($conf['dir'] . $lang_dir . ".php") ? $lang_dir : "en-gb";
    require_once "./lang/" . $lang_dir . ".php";

    Replace it with this block of code:

    //Require our language file
    $lang_dir = file_exists($conf['dir'] . "lang/" . $conf['default_pub_lang'] . ".php") ? $conf['default_pub_lang'] : "en-gb";
    require_once $conf['dir'] . "lang/" . $lang_dir . ".php";

    Let me know if you have any problems with this.

    Posted 7 months ago #
  3. Lufrutta
    Member

    Great, it works fine. Thank you very much.

    Posted 7 months ago #
  4. corbyboy
    Key Master

    No problem. I will get it fixed in the next release too.

    Posted 7 months ago #
  5. krillmeed
    Member

    I would also be interested in having the language files for German if its possible

    Posted 7 months ago #
  6. Lufrutta
    Member

    I started to translate but I'm a bit under time pressure with other projects at the moment. So I'll not be able to do a seriouse translation work before February or even beginning of March.

    Just allow me a general question. I'm not sure how it works with WebCards. In my opinion it is not an open source software like Joomla! or Wordpress (to be honest, I did not take the time to read thru any licenses) I paied these $50.-- because I belive it is worth. The code is seriouse and save, well structured and not overloaded and it is very easy to create own templates. When I do the translations it will not be a problem for me to make them public. But it could be against the rules here. Who knows the answer to that issue? How is this handled?

    Posted 7 months ago #
  7. corbyboy
    Key Master

    There are no official translations available because, frankly, I would never be able to keep up with the constant updates that would be necessary.

    If you make a translation from the English language file, you are free to do what you like with it. Sell it, give it away for free, it belongs to you so you can decide.

    If you would like to release it to the community, I would be happy to make it an "official" release and let everybody else download it if you would like.

    Posted 7 months ago #

RSS feed for this topic

Reply

You must log in to post.