christophdb

christophdb supports this item

Supported

This author's response time can be up to 2 business days.

40 comments found.

Hi,

great script, just what I was looking for! I’m using it to translate my personal page, but I came across a little problem. I’m using a one page solution with different sections that are displayed using jquery.easytabs. Now when I click on a flag to translate to a different language it will always take me back to the first tab. Is there a way for your script to remember what tab the user was on before and take him to the same tab in the other language?

Tina

hm, strange, why is it working this way:

<?php
$langArray = $translate->getAllLanguages();
for($i = 0; $i < count($langArray); $i++){
echo " ";
echo "<script type=\"text/javascript\">";
echo "if(window.location.hash) {";
echo "var hash_value = window.location.hash.replace('#','');";
echo "document.write(\"\");";
echo "};";
echo "</script>";
echo " ";
}?>

with the url output looking like this /?lang=de#about?lang=de

but not this way with the correct url output (I can see that the correct language thing is attached to the url but the language of the content isn’t switched. url looks like this which seems to be correct, right? /#about?lang=de:

<?php
$langArray = $translate->getAllLanguages();
for($i = 0; $i < count($langArray); $i++){
echo " ";
echo "<script type=\"text/javascript\">";
echo "if(window.location.hash) {";
echo "var hash_value = window.location.hash.replace('#','');";
echo "document.write(\"\");";
echo "};";
echo "</script>";
echo " ";
}?>

umpf, bugger…. the script is only getting the hashtagthing when I refresh the page…

hey Tina, sorry for no responses within the last weeks. My second son was born and I didn’t checked the comments on codecanyon. Can you send me via codecanyon a mail with the link to your page. I want to have a deeper look and I will try to solve your problem.

I have not purchased yet – I have a couple questions.

1) I’d like to put this in the sidebar. And only offer English and Spanish – can this be put in a sidebar widget using the test widget?

2) Once the viewer hits Spanish Language – does EVERY PAGE in his viewing experience render in Spanish?

Thanks in advance – looks like a very nice plugin!

Paul

Hey Paul, 1) I don’t see any reason why it should not work within a widget. Only be aware that the change of the language needs a page reload. (= because it is a link). 2) “Every Page” depends of you. My class does not translate for you. It provides the structure that you can easily define the different language terms in separate files. Best regards, Christoph

Hi Script author,

I bought the script, but I can not configure it. I the help folder contents and code comments are not very helpful.

Can you explain step by step what I have to do.

Thanks for all.

Hi mossman0, upload everything from the source folder to your webspace. The index.php is a good example to start with.

1) You need to include the 3 lines of code to include the translate class.

2) define any text snippets in the language files. (de_lang.php or en_lang.php in the subfolder Translate). e.g. to en_lang.php: ‘first_text’ = ‘my first sentence’; e.g. to de_lang.php: ‘first_text’ = ‘mein erster Satz.’;

3) with ”$translate->_(‘first_text’);” php will write to the webpage the text defined for the current language.

If that does not work. Send me your files and I will help you for a concrete example. Best regards Christoph

possible tranlation to portuguese? translate full website?

ty

Hi fotografo123, my translate php class does not translate for you. You have to provide the text snippets and my class does provide an easy approach to translate a page. So the answer is: yes, the class can translate a full website to portuguese. Best regards Christoph

Hi, I just purchased this. I am a little confused. I have over 3000 pages that I need to be able to translate, is there a way I can put the class file in my include header and be able to translate for any page? Or does one have to have a translation done for each page?

Thanks

Hi drlox, my translate script does not translate for you. You have to define the language files and replace the text with the predefined variables on the page. In that way you can translate a page to as many languages as you like. Please see other comments and the example page of my script. Best regards Christoph

Hi ich hab bis ca 380 sätze übersetzt, wenn ich aber weitere in lang_de.php eingebe bekomme ich leere seite wo kann ich es erhöhen so das ich meine seite ganz übersetzen kann? Danke

über eine baldige antwort würde ich mich freuen

Hi adominator, grundsätzlich dürfte es keine Limitierung von seiten des Scriptes geben. Ich vermute eher eine Limitierung in der Speicherfähigkeit von PHP. Kriegst du irgendwelche Fehlermeldungen oder kannst du mir deinen Code per E-Mail schicken? VG, Christoph

Hi, Got the PHP script working on all pages of my website, have set up language files for both English and German, it works fine when i click on the flags to change, but it defaults to english when i change pages on the site, was hoping that once you selected German it would stay on german.

I’m using your code snippet for the session variable, but not been very good at PHP don’t know if I’m doing anything wrong.

I’m using your code directly from the sample file in the download.

Thanks, Gary

<?php require_once ('Translate/Translate_class.php'); $translate = new translate(); $translate->setBrowserLanguage(); if(isset($_GET['lang'])){ $translate->setLanguage(substr($_GET['lang'], 0, 2)); $_SESSION['lang'] = substr($_GET['lang'], 0, 2); } if(isset($_SESSION['lang'])){ $translate->setLanguage($_SESSION['lang']); } ?>

Hi Gary, you add session_start() one time at every page. That is correct.

Thank you, all working just how just how i need it, must say easy to set up and get up and running, just need this final touch.

Thanks Gary

Hello I want to buy this plugin. But i have one question is this plugin translate the below languages. English Hindi French Spanish German Polish Russian Italian Arabic Chinese Japanese Portugal If all language is translate then only i ll buy this plugin

Hi yesweus,

my translate php class does not translate for you. You have to provide the text snippets and my class does provide an easy approach to translate a page. So the answer is: yes, the class can translate a full website to all desired languages, but you have to provide the text snippets.

Best regards Christoph

Is this converter can be use for English to Arabic language.

yeah the converter can be used for english and arabic. But please be aware that the converter does not translate for you. You as owner of the website have to provide the language translations. I offer you an easy way to include your language text files to the page !

Hi. Is it possible to switch between languages without using ?lang in the URL?

Hi Giuseppe, currently not. What do you need? Something with java or jquery? Best regards Christoph

Hi, How to do this: $page_name = $translate->_(‘homepage’);

it return this error Fatal error: Call to a member function _() on a non-object

Hi mojeer,

Hi xsxoxs, sorry for the late response. I founded my own business 3 month ago and got my third kid – so trouble and sleepless nights are a constant situation.

that is the wrong way. $translage->_(‘homepage’) does not deliver a variable. It prints or echos the text snippet that belongs to ‘homepage’ in your language files.

Best regards Christoph

Hi I have more than 3 PHP website and i want to buy automatic translator for my websites

i have some question

1- is your script using google translate ? (i prefer google translate) 2- is this full source code ? i want use on all 3 websites, or buy license for each site 3- is there any limitation on translate or not ? 4-is it need to change my codes on site or no?

answering this questions help me to choose best for my websites

thanks

Hi xsxoxs, sorry for the late response. I founded my own business 3 month ago and got my third kid – so trouble and sleepless nights are a constant situation.

Now to your question: 1) no I am not using google translate. You have to provide language files that are used to replace variables on your website. 2) you receive the complete source code and you can use it on any website 3) no limitations but you have to provide the language files 4) yes you have to replace the current text with variables. Best regards Christoph

Hello,

Do you know how I can echo the variables in Smarty PHP templates? I know that Smarty supports {php}{/php} tags but I want to avoid using them. Currently I’m adding all phrases in an array and then I’m dispaying them in the templates like: {$LANG.my_phrase}

Thank you
Christos

Hi Chris, I have now experience with smarty php templates. Why do you want to avoid php code in the templates? Best regards Christoph

hello, how can i contact you ,before i buy this one? thanks

por favor faça o reembolso pois o codigo não serviu pois nao tem o idioma portugues

por favor faça o reembolso pois o codigo não serviu pois nao tem o idioma portugues

Hello,

I want to buy your script but I wanted to know if it can also translate the dropdown options?

Thanks and Kind Regards.

Alain

HI Alain78, can you give more information what you mean? Best regards Christoph

Hmm, i dont get it to work, and now i see that there is also no support for this. Bummer

Hi Marcelstegeman, sorry for late response. Please contact me If you need any help. Best regards Christoph

I just want to say ”!!Thank You!!” for this f_king awesome script. You saved me plenty of time. Well working, and very easy to use. Thumb Up!

Hi pocakka, thank you very much. Best regards Christoph

hcb2100

hcb2100 Purchased

Hello,can i use your translate script for a html site ? Thank you.

by
by
by
by
by
by