This topic is locked
[SOLVED]

 Multilanguage add page

6/1/2010 12:36:35 AM
PHPRunner General questions
D
ddefrain author

Hi There i just get phprunner.

I'm testing just the tables list add page; works just fine; how did i put the multilanguage block in there so the add page refresh when i select a diferent language.

Thanks in advance. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=14545&image=1&table=forumtopics' class='bbc_emoticon' alt=';)' />

J
Jane 6/1/2010

Hi,
use custom event (Insert PHP code snippet option on the Visual Editor tab) to create dropdown with languages.

Check sample code for language dropdown on the list page. This dropdown is created on the list page automatically if you select more than one language on the Miscellaneoustab.

D
ddefrain author 6/1/2010

Wow!...Awesome support i'll check it out.

Thanks Jane .



Hi,
use custom event (Insert PHP code snippet option on the Visual Editor tab) to create dropdown with languages.

Check sample code for language dropdown on the list page. This dropdown is created on the list page automatically if you select more than one language on the Miscellaneoustab.

D
ddefrain author 6/2/2010

Hi again.

I put this snippet into the add page
function hispana_Snippet1()

{

$str = "";

$str.= '<select {$langselector_attrs}> <option value="English" {$English_langattrs}>English</option> <option value="Spanish" {$Spanish_langattrs}>Español</option>';

$str.= '</select>';

echo $str;
The dropdown language shows; but now how can i "reload" or change the language in the tables_add.php page, based on the dropdown selected language.
I select language <multi-language> (english and spanish) on the Miscellaneous project settings tab.

Note: I'm only testing the tables_add.php i don't need for now the tables_list.php.
Sorry to bother you <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=50227&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' /> <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=50227&image=2&table=forumreplies' class='bbc_emoticon' alt=':(' /> <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=50227&image=3&table=forumreplies' class='bbc_emoticon' alt=':(' /> <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=50227&image=4&table=forumreplies' class='bbc_emoticon' alt=':(' /> <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=50227&image=5&table=forumreplies' class='bbc_emoticon' alt=':(' /> <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=50227&image=6&table=forumreplies' class='bbc_emoticon' alt=':(' /> <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=50227&image=7&table=forumreplies' class='bbc_emoticon' alt=':(' />

Thanks in advance.

J
Jane 6/4/2010

Hi,
here is a sample:

echo " <select name=lang onchange=\"javascript: window.location='products_add.php?language='+this.options[this.selectedIndex].value\">";
if ($_REQUEST["language"]=="English")

echo "<option value=\"English\" selected>English</option>";

else

echo "<option value=\"English\" >English</option>";
if ($_REQUEST["language"]=="Spanish")

echo "<option value=\"Spanish\" selected>Español</option>";

else

echo "<option value=\"Spanish\" >Español</option>";
echo " </select>";


Then process selected language in the Add page: Before process event:

if(@$_REQUEST["language"])

$_SESSION["language"]=@$_REQUEST["language"];
D
ddefrain author 6/4/2010

Mamma Mia!

As i said; such a wonderful support and program you have.

Thank you so much. Jane; Appreciate <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=50321&image=1&table=forumreplies' class='bbc_emoticon' alt=';)' />..Problem solved to me!

S
simonedan 6/5/2010



Hi,
here is a sample:

echo " <select name=lang onchange=\"javascript: window.location='products_add.php?language='+this.options[this.selectedIndex].value\">";
if ($_REQUEST["language"]=="English")

echo "<option value=\"English\" selected>English</option>";

else

echo "<option value=\"English\" >English</option>";
if ($_REQUEST["language"]=="Spanish")

echo "<option value=\"Spanish\" selected>Español</option>";

else

echo "<option value=\"Spanish\" >Español</option>";
echo " </select>";


Then process selected language in the Add page: Before process event:

if(@$_REQUEST["language"])

$_SESSION["language"]=@$_REQUEST["language"];



I try to apply this Solution it dos not works.

Here is the List Page Language Block:

{BEGIN languages_block}<SPAN><B>{BEGIN lang_label}{mlang_message LANGUAGE}:{END lang_label}</B>&nbsp; <SELECT

{$langselector_attrs}> <OPTION value=Czech {$Czech_langattrs}></OPTION>

<option value="English" {$English_langattrs}>English</OPTION>

<option value="German" {$German_langattrs}>Deutsch</OPTION>

<option value="Greek" {$Greek_langattrs}>Ελληνικά</OPTION> <option value="Italian" {$Italian_langattrs}>Italiano</OPTION>

<option value="Polish" {$Polish_langattrs}>Polski</OPTION> <option value="Slovak" {$Slovak_langattrs}>Slovenčina</OPTION> <option value="Spanish" {$Spanish_langattrs}>Español</OPTION></SELECT> </SPAN>{END languages_block}</DIV>{END toplinks_block}
I would like to have it at the Add Page.Can You help???Thanks.

D
ddefrain author 6/8/2010

This sample works nice!

Maybe you're missing something.

Did you put the Add page: Before process event: ?

Maybe the window.location name ?

Did you put the snippet?



I try to apply this Solution it dos not works.

Here is the List Page Language Block:

{BEGIN languages_block}<SPAN><B>{BEGIN lang_label}{mlang_message LANGUAGE}:{END lang_label}</B>&nbsp; <SELECT

{$langselector_attrs}> <OPTION value=Czech {$Czech_langattrs}></OPTION>

<option value="English" {$English_langattrs}>English</OPTION>

<option value="German" {$German_langattrs}>Deutsch</OPTION>

<option value="Greek" {$Greek_langattrs}>Ελληνικά</OPTION> <option value="Italian" {$Italian_langattrs}>Italiano</OPTION>

<option value="Polish" {$Polish_langattrs}>Polski</OPTION> <option value="Slovak" {$Slovak_langattrs}>Slovenčina</OPTION> <option value="Spanish" {$Spanish_langattrs}>Español</OPTION></SELECT> </SPAN>{END languages_block}</DIV>{END toplinks_block}
I would like to have it at the Add Page.Can You help???Thanks.

S
simonedan 6/9/2010

Thanks, I'retry



This sample works nice!

Maybe you're missing something.

Did you put the Add page: Before process event: ?

Maybe the window.location name ?

Did you put the snippet?

S
simonedan 6/12/2010

Thanks,I'll take a look.



This sample works nice!

Maybe you're missing something.

Did you put the Add page: Before process event: ?

Maybe the window.location name ?

Did you put the snippet?

S
simonedan 6/12/2010

It works, thanks



This sample works nice!

Maybe you're missing something.

Did you put the Add page: Before process event: ?

Maybe the window.location name ?

Did you put the snippet?