phpCOIN

Forum Rules Language Translations

For questions and issues dealing with language translations. This forum is moderated and answered by the translation developers, not by phpCOIN staff

  Reply to this topicStart new topic

> Running Multiple Languages, Running Multiple Languages
sempervalor
  Posted: September 05, 2012 03:10 pm
Quote Post


Newbie
*

Group: Probation
Posts: 2
Member No.: 4,578
Joined: September 05, 2012



I would like to set-up Php Coin for my users to be able switch to the viewing language to the following languages and submitt in those languages: Hebrew , French, Arabic, Spanish, Portuguese, Italian and German. But, I am not 100% sure on how? I know how to set it up for 1 language, but I am afraid to mess up everything trying multiple languages.

If anyone can help with the details on how, I would really appreciated. In addition, I will also provide the the translations for others to use.

Please help. my email is sempervalor@gmail.com

If its not possible to I have to set-up a different site per each language?
PMEmail Poster
Top
lightman
Posted: September 06, 2012 04:58 am
Quote Post


The Janitor
***

Group: Admin
Posts: 3,639
Member No.: 3
Joined: August 25, 2006



phpCOIN v1.6.5

Unfortunately, phpCOIN has no built-in facilities for switching languages on the fly..

Language strings are mainly file driven so you can easily translate the whole of phpCOIN to whatever you want (see https://www.phpcoin.com/mod.php?mod=downloads for contributed translations) but you can only run the application in one language at a time.



--------------------
***** Unless otherwise stated, all replies refer to the following *****
====================================================================
--- The latest unmodified version of phpCOIN available from the phpCOIN download page on the date and time of this post.
--- All relevant HotFix files applied - One of the four included unmodified themes - The original language files .
--- Help will be given to install/configure/use phpCOIN, but not programming help to modify phpCOIN operations. If you are competent enough to make programming changes, you should be competent enough to read the source code and figure things out :)
PM
Top
sempervalor
  Posted: September 15, 2012 01:29 pm
Quote Post


Newbie
*

Group: Probation
Posts: 2
Member No.: 4,578
Joined: September 05, 2012



Thank for ur quick reply.

I just have a few questions to clarify.

1. So if I set up a landing page to choose a language for viewing the site; does it use the same database and any user I have can login in any language?

2. Or I need to create a different PHP site/database for each language?

3. Is there a how to for this?

Please advise......
PMEmail Poster
Top
lightman
Posted: September 15, 2012 02:13 pm
Quote Post


The Janitor
***

Group: Admin
Posts: 3,639
Member No.: 3
Joined: August 25, 2006



QUOTE
you can only run the application in one language at a time.


We do NOT support changing languages on the fly and there is no documentation to instruct you how to do it.

Whilst many strings are file driven, there is also a lot that is held in the database - so using one database for multiple language versions of phpCOIN running in separate sub domains/paths will probably confuse a user when they see stings that are in another language !

You would have to do a lot of core re-writing of the code to fully support multiple languages on the fly, however you go about it sad.gif


--------------------
***** Unless otherwise stated, all replies refer to the following *****
====================================================================
--- The latest unmodified version of phpCOIN available from the phpCOIN download page on the date and time of this post.
--- All relevant HotFix files applied - One of the four included unmodified themes - The original language files .
--- Help will be given to install/configure/use phpCOIN, but not programming help to modify phpCOIN operations. If you are competent enough to make programming changes, you should be competent enough to read the source code and figure things out :)
PM
Top
Rein
Posted: September 30, 2012 01:31 pm
Quote Post


Newbie
*

Group: Members
Posts: 5
Member No.: 4,354
Joined: October 07, 2010



I used to run a site with PHPCOIN in five different languages. The most practical approach I've found is to run one PHPCOIN for each language. In my case it meant five installations and five databases. Using a language-prefix for every installation could be an alternative.
Each installation had its own subdomain, e.g. de.domain.com for German, en.domain.com for English, fr.domain.com for French etc.
Using sub-domains has some SEO advantages; putting everything on one domain makes it difficult for seach engines to index all pages.
For switching between languages I used a simple index.php file on the main domain and language links in all installations. To my experience clients hardly ever switch languages once they've found their own, but it's a good thing to let them choose their preferred language.
The index file on the main domain does a little trick: it directs visitors to the language they use for their browser. It's something like this:
CODE
<?php
$locatie = 'http://en.domain.com/index.php'; // default location
// check $_SERVER["HTTP_ACCEPT_LANGUAGE"]
if (isset($_SERVER["HTTP_ACCEPT_LANGUAGE"])) {
   // explode string ('nl, en-us, en' etc.)
   $talen = explode(",",$_SERVER["HTTP_ACCEPT_LANGUAGE"]);
   //loop through languages
   foreach ($talen as $value) {
       $taal=substr($value,0,2); // only first 2 characters
       // if language is present overwrite default location, else use English
       switch ($taal) {
           case "fr":
           $locatie = 'http://fr.domain.com/index.php';
           break 2; // break 2 to leave the switch AND the foreach
           case "de":
           $locatie = 'http://de.domain.com/index.php';
           break 2;
           case "nl":
           $locatie = 'http://nl.domain.com/index.php';
           break 2;
           case "fy":
           $locatie = 'http://fy.domain.com/index.php';
           break 2;
       }
   }
}
header("Location: $locatie")  ;      // write header
?>

You could extend the index file with language links pointing to the different installations in case the visitor hasn't set $_SERVER["HTTP_ACCEPT_LANGUAGE"].

Still: a little warning. It's a hell of a job to maintain sites in different languages in the way I described. In your case it would mean seven installations, in fact seven websites. It can be done, but it will take al lot of time.
Nevertheless: I wish you lots of success.
PMEmail PosterUsers Website
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topic

 


Inscrita el Registro Mercantil de Mallorca Tomo 2140, Hoja No. PM-51034, Folio 135
This website owned and operated by: Technology Services RPVW S.L. CIF# B57345084
Avda Constitucion 48 Bajos Alaro 07340 Baleares SPAIN
Tel:+34 971518362    Fax: +34 971518368    eMail: support@phpcoin.com