The AVChat forums moved to discuss.avchat.net

Jump to content


Photo

Multiple Languages?


  • Please log in to reply
10 replies to this topic

#1 ansthomas

ansthomas

    Member

  • Members
  • PipPip
  • 12 posts

Posted 24 December 2010 - 04:22 PM

Hi,
I have 7 languages in my site. I'm using phpFox and it has its own language system where you can add phrases to it. I tried to use it with my AVChat but it doesn't work. Is possible to have multiple languages with AVChat?

Greetings,
Ans

#2 Rafa

Rafa

    Advanced Member

  • Members
  • PipPipPip
  • 322 posts

Posted 24 December 2010 - 09:15 PM

Yes its possible!

Take a look at avc_settings.xxx and find out the string related to language file.

You can create your own code to load a specific lang file, based on user browser language.

#3 ansthomas

ansthomas

    Member

  • Members
  • PipPip
  • 12 posts

Posted 26 December 2010 - 10:56 AM

Yes its possible!

Take a look at avcsettings and find out the string related to language file.

You can create your own code to load a specific lang file, based on user browser language.


Hi Rafa,
Thank you for your answer.
I have th following setting:
$avconfig['languagefile']='translations/en.xml';

Do you have an example that I can use?

Thank you in advance,
Ans

#4 Octavian

Octavian

    Founder and CEO

  • Administrators
  • 1,911 posts
  • LocationBucharest, Romania

Posted 06 January 2011 - 01:43 PM

You have to dinamically change the value of that variable depending on the language selected by the user in PhpFox or the langauge of the web browser he's using!

Any php developer will know how to do that!

#5 ansthomas

ansthomas

    Member

  • Members
  • PipPip
  • 12 posts

Posted 10 January 2011 - 09:20 PM

You have to dinamically change the value of that variable depending on the language selected by the user in PhpFox or the langauge of the web browser he's using!

Any php developer will know how to do that!


Hi Octavian,
Thank you I will ask somebody that I know.

Greetings,
Ans

#6 hollywoodstarrs

hollywoodstarrs

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 10 April 2011 - 12:43 AM

You have to dinamically change the value of that variable depending on the language selected by the user in PhpFox or the langauge of the web browser he's using!

Any php developer will know how to do that!


Octavian,
I am suprised you didnt put the answer to this question. Just because a php developer should know the answer...dosen't mean you cant provide it here. Isn't that what this is all about?---Allen

#7 Octavian

Octavian

    Founder and CEO

  • Administrators
  • 1,911 posts
  • LocationBucharest, Romania

Posted 05 June 2011 - 10:36 AM

Here's a solution posted by another forum user o how to serve a language file to AVChat based on the visitor's browser setting:

http://avchathq.com/...ndpost__p__2366

To do that based on the visitors/members setting in phpFox I would have to study a bit the way these options are saved/retrieved in phpFox.

#8 Richard67

Richard67

    Advanced Member

  • Members
  • PipPipPip
  • 131 posts
  • LocationGermany

Posted 11 September 2011 - 02:10 PM

Hello,

I have a Joomla 1.7 multilingual site, using Joomla's language switcher.

For starting AVChat in the currently selected language I have added following code to the integration.php script:

$lang = &JFactory::getLanguage();

//Change language file to file for adjusted language, if available
$testlangfile = 'translations/'.$lang->get('tag').'.xml';
if(file_exists("$testlangfile")){
$avconfig['languagefile']=$testlangfile;
}

(code end)

The code checks if there is a file named like the language tag, e.g. "de-DE.xml" or "ru-RU.xml" in the translations folder and, if so, overwrites the default value for $avconfig['languagefile'] previously set by the avc_settings.php script.

Maybe this helps someone who wants the same thing, too.

Because this solution does not contain any hard-coded language names and is fully conformal to Joomla standards, it should be considered to integrate it into the AVChat Joomla component with future versions.

In addition, I have attached a German (informal) language file. It is based on the germani.zip provided here in these forums and corrects a few thing, e.g. there were encoding errors in the file, German "Umlaute" ä, ö, ü were transcripted with ae, oe and ue, and there were several things not translated well or not consistent, e.g. the text in the welcome message on what to click to send the text was not equal to the button caption (this error exists in the English standard language file en.xml, too).

Regardless of the errors in germani.zip: Thanks to the guy who provided it; it was a very good starting point and saved me lots of work, so I did not have to translate everything from scratch.

My file may be an improvement but still be not perfect ;-)

(attachment removed, updated version in topic german translation)

#9 Richard67

Richard67

    Advanced Member

  • Members
  • PipPipPip
  • 131 posts
  • LocationGermany

Posted 11 September 2011 - 03:33 PM

Sorry, the language file de-DE.xml I've added with my post before contained modifications for my website.

Here I attach now one which is the translation of the standard English file without these modifications.

(attachment removed, updated version in topic german translation)

#10 Guest_mytony_*

Guest_mytony_*
  • Guests

Posted 27 September 2011 - 01:00 AM

That is good, i can only see english article.

#11 shawneo

shawneo

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 25 October 2013 - 12:24 AM

Hello,

I have a Joomla 1.7 multilingual site, using Joomla's language switcher.

For starting AVChat in the currently selected language I have added following code to the integration.php script:

$lang = &JFactory::getLanguage();

//Change language file to file for adjusted language, if available
$testlangfile = 'translations/'.$lang->get('tag').'.xml';
if(file_exists("$testlangfile")){
$avconfig['languagefile']=$testlangfile;
}

(code end)

The code checks if there is a file named like the language tag, e.g. "de-DE.xml" or "ru-RU.xml" in the translations folder and, if so, overwrites the default value for $avconfig['languagefile'] previously set by the avc_settings.php script.

Maybe this helps someone who wants the same thing, too.

Because this solution does not contain any hard-coded language names and is fully conformal to Joomla standards, it should be considered to integrate it into the AVChat Joomla component with future versions.

In addition, I have attached a German (informal) language file. It is based on the germani.zip provided here in these forums and corrects a few thing, e.g. there were encoding errors in the file, German "Umlaute" ä, ö, ü were transcripted with ae, oe and ue, and there were several things not translated well or not consistent, e.g. the text in the welcome message on what to click to send the text was not equal to the button caption (this error exists in the English standard language file en.xml, too).

Regardless of the errors in germani.zip: Thanks to the guy who provided it; it was a very good starting point and saved me lots of work, so I did not have to translate everything from scratch.

My file may be an improvement but still be not perfect ;-)

(attachment removed, updated version in topic german translation)


I noticed this is already in my integration.php file, so I guess the avchat guys already added this to the standard install? Problem is it doesn't work for me. I am using standard Joomla Language switcher with joomla 2.5 and when I switch to my /cn or chinese version it doesn't switch my avchat. So is this whole integration with joomla language switcher not working anymore?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users