Announcement

Collapse
No announcement yet.

Multiple languages

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Multiple languages

    I am trying to build a script with multiple lanaguage capability, ie french, german etc. What i want is the user to be able to set a language by clicking on a link and this sets it in their session.

    That i can do.


    What do you think is the best way to go about doing this? one option i can think of is to have multiple text files, or lanaguage packs with the words all defined as variables in there. Then simply doing:

    require ($langauge.inc);

    where language is the one wanted and do:

    if (!$language) {
    require (en.inc);
    } else {
    require ($langauge.inc);
    }

    sort of thing.

    What do people think, is is a bad plan to include the whole file like this?
    Christopher Padfield
    Web Based Helpdesk
    DeskPRO v3.0.3 Released - Download Demo Now!

  • #2
    you should use this throughout your script
    <?php
    include($language.lng);

    Print ($notice[Welcome]);

    ?>

    and then have language files

    Example Files
    ------------------
    english.lng
    ~~~~~~~~~~~
    $notice[Welcome] = "Welcome to Blah";

    german.lng
    ~~~~~~~~~~~
    $notice[Welcome] = "Wilkommen Blah";

    french.lng
    ~~~~~~~~~~~
    $notice[Welcome] = "Bienvenue à Blah";

    where the file included is only changing not the variable.
    Scott MacVicar

    My Blog | Twitter

    Comment


    • #3
      yup, that makes sense. thank you.
      Christopher Padfield
      Web Based Helpdesk
      DeskPRO v3.0.3 Released - Download Demo Now!

      Comment


      • #4
        That simple support script in your book is cool.

        but isn't £50 a bit pricy?


        I will just do my own probably. I use the language files with nearly all my scripts. Makes things hell of easy.
        Scott MacVicar

        My Blog | Twitter

        Comment


        • #5
          well it is $50 so that is more like £30 which i don't think is too bad really ....
          Christopher Padfield
          Web Based Helpdesk
          DeskPRO v3.0.3 Released - Download Demo Now!

          Comment


          • #6
            how about a freeware version

            it would be cool.
            Scott MacVicar

            My Blog | Twitter

            Comment


            • #7
              yes but it dosen't help pay my server bill which is the whole idea of this
              Christopher Padfield
              Web Based Helpdesk
              DeskPRO v3.0.3 Released - Download Demo Now!

              Comment


              • #8
                just my thoughts on pricing scripts....
                1) How does my script compare to similar scripts?
                2) Who are my target customers? (businesses or hobbiests)

                Comment


                • #9
                  yup been there.... most scripts that do customer support are very expensive, $500 and up. I am planning one of these that competes with wonderdesk, but have only done the core functions so far.

                  There is not much in the realm of a simple script like what i made, i couldn't find one which is why i made it. The audience is clearly people trying to sell something so $50 is not that much.
                  Christopher Padfield
                  Web Based Helpdesk
                  DeskPRO v3.0.3 Released - Download Demo Now!

                  Comment

                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                  Working...
                  X