This topic is locked

table headers in other language

4/5/2007 9:00:30 AM
PHPRunner General questions
A
amplus author

table headers in other language
who can tell me how i can do this simple.

J
Jane 4/5/2007

Hi,
I'm not sure that I understand you correctly.

Please clarify where you want to use another table headers?

A
amplus author 4/5/2007

Hi,

I'm not sure that I understand you correctly.

Please clarify where you want to use another table headers?


I want the translation on every page. (list/edit/add)

J
Jane 4/5/2007

Hi,
you can do the following:

  1. use {mlang_message tag="TableName"} instead of your table names on the Visual Editor tab.
  2. build your project.
  3. open generated include/languages.php file and add new lines at the end of file.

    Here is a sample code for the Spanish and French languages:
    $mlang_messages["English"]["TableName"]="TableName";

    $mlang_messages["Spanish"]["TableName"]="SpanishTableName";

    $mlang_messages["French"]["TableName"]="FrenchTableName";

A
amplus author 4/5/2007

Hi,

you can do the following:

  1. use {mlang_message tag="TableName"} instead of your table names on the Visual Editor tab.
  2. build your project.
  3. open generated include/languages.php file and add new lines at the end of file.

    Here is a sample code for the Spanish and French languages:


Hello Jane,
Can you tel me where exactly you mean in. see the file here below.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML><HEAD><TITLE>onderhoud artikel</TITLE>

<META http-equiv=Content-Type content="text/html; charset=windows-1252"><LINK

href="include/style.css" type=text/css rel=stylesheet>

<META content="MSHTML 6.00.2900.3059" name=GENERATOR></HEAD>

<BODY bgColor=#bbe9ff topMargin=5

{$onload}>{$includes}{include_if_exists file="include/header.php"}

<FORM name=frmSearch action=artikel_list.php method=get><input type="Hidden" name="a" value="search"><input type="Hidden" name="value" value="1"><input type="Hidden" name="SearchFor" value=""><input type="Hidden" name="SearchOption" value=""><input type="Hidden" name="SearchField" value=""></FORM>

<TABLE>

<TBODY>

<TR>

<TD width=30>&nbsp;</TD>

<TD align=middle><FONT size=+0><B>&nbsp;onderhoud&nbsp;artikel</B></FONT>

</TD>

<TD align=middle width=50>

<TD align=middle width="80%">

<TABLE align=center border=0>

<TBODY>

<TR>

<TD width=10>&nbsp;</TD>

<TD align=middle>{mlang_message tag="LOGGED_AS"}&nbsp;<B>{$userid}</B>&nbsp; <A

href="login.php?a=logout">{mlang_message tag="LOG_OUT"}</A> </TD>

<TD width=20>&nbsp;</TD><!-- language selector -->

<TD vAlign=center align=middle>{mlang_message tag="LANGUAGE"}:</TD>

<TD align=middle><select name=lang onchange="java script: window.location='artikel_list.php?language='+this.options[this.selectedIndex].value">
<option value="Dutch(Standard)" {if $language=="Dutch(Standard)"} selected {/if}>Dutch(Standard)</option>
<option value="English" {if $language=="English"} selected {/if}>English</option>
<option value="German" {if $language=="German"} selected {/if}>German</option>
</select> </TD>

<TD width=20>&nbsp;</TD>{if $allow_search}

<TD align=middle><A href="artikel_search.php">{mlang_message tag="ADVANCED_SEARCH"}</A> </TD>

<TD width=20>&nbsp;</TD>{/if}{if $allow_export}

<TD align=middle><A href="artikel_export.php" target=_blank>{mlang_message tag="EXPORT_RESULTS"}</A>

</TD>

<TD width=20>&nbsp;</TD>

<TD align=middle><A href="artikel_print.php" target=_blank><IMG

src="images/printer.gif" border=0></A> </TD>

<TD align=middle><A href="artikel_print.php" target=_blank>{mlang_message tag="PRINTER_FRIENDLY"}</A> </TD>

<TD

width=20>&nbsp;</TD>{/if}</TR></TBODY></TABLE></TD></TR></TBODY></TABLE>{doevent name="ListOnLoad"}

<TABLE

style="BORDER-RIGHT: #c0c0c0 1px solid; BORDER-TOP: #c0c0c0 1px solid; BORDER-LEFT: #c0c0c0 1px solid; BORDER-BOTTOM: #c0c0c0 1px solid"

cellSpacing=1 cellPadding=4 width="95%" align=center border=0>

<TBODY>

<TR>{if $allow_add}<!-- Add new record -->

<TD class=shade align=middle><A href="artikel_add.php">{mlang_message tag="ADD_NEW"}</A> </TD>{/if}{if $allow_search}

<TD class=shade vAlign=center align=middle><B>{mlang_message tag="SEARCH_FOR"}: </B>&nbsp;&nbsp;&nbsp; <select id="ctlSearchField">

<option value="">{mlang_message tag="ANY_FIELD"}</option>
<option value="eenheidtype" {$search_eenheidtype}>eenheidtype</option>
<option value="eenheid" {$search_eenheid}>eenheid</option>
<option value="subgroep" {$search_subgroep}>subgroep</option>
<option value="artikel_nr" {$search_artikel_nr}>nummer</option>
<option value="sturing_omschrijving" {$search_sturing_omschrijving}>status</option>
<option value="artikel_ean" {$search_artikel_ean}>ean</option>
<option value="artikel_omschrijving" {$search_artikel_omschrijving}>omschrijving</option>
<option value="artikel_kleur" {$search_artikel_kleur}>kleur</option>
</select> &nbsp;

<select id="ctlSearchOption">

<option value="Contains" {$search_contains_option_selected}>{mlang_message tag="CONTAINS"}</option>

<option value="Equals" {$search_equals_option_selected}>{mlang_message tag="EQUALS"}</option>

<option value="Starts with ..." {$search_startswith_option_selected}>{mlang_message tag="STARTS_WITH"}</option>

<option value="More than ..." {$search_more_option_selected}>{mlang_message tag="MORE_THAN"}</option>

<option value="Less than ..." {$search_less_option_selected}>{mlang_message tag="LESS_THAN"}</option>

<option value="Equal or more than ..." {$search_equalormore_option_selected}>{mlang_message tag="EQUAL_OR_MORE"}</option>

<option value="Equal or less than ..." {$search_equalorless_option_selected}>{mlang_message tag="EQUAL_OR_LESS"}</option>

<option value="Empty" {$search_empty_option_selected}>{mlang_message tag="EMPTY"}</option>

</select> &nbsp; <INPUT id=ctlSearchFor

onkeydown="e=event; if(!e) e = window.event; if (e.keyCode != 13) return true; e.cancel = true; RunSearch(); return false;"

{$search_searchfor}> &nbsp; <input type=button class="button" value="{mlang_message tag="SEARCH"}"

onClick="java script: RunSearch();">

&nbsp; <input type=button class=button value="{mlang_message tag="SHOW_ALL"}"

onClick="java script: frmSearch.a.value = 'showall'; frmSearch.submit();">

</TD><!-- how many records found-->

<TD class=shade align=middle>{mlang_message tag="DETAILS_FOUND"}: {$records_found}<BR>{mlang_message tag="PAGE1"} {$page}{mlang_message tag="PAGE2"} {$maxpages}</TD><!--Records per page-->

<TD class=shade align=middle>{mlang_message tag="RECORDS_PP"}:<BR><select

onChange="java script: document.location='artikel_list.php?pagesize='+this.options[this.selectedIndex].value;">

<option value="10" {$rpp10_selected}>10</option>

<option value="15" {$rpp15_selected}>15</option>

<option value="20" {$rpp20_selected}>20</option>

<option value="25" {$rpp25_selected}>25</option>

<option value="30" {$rpp30_selected}>30</option>

<option value="35" {$rpp35_selected}>35</option>

<option value="40" {$rpp40_selected}>40</option>

<option value="45" {$rpp45_selected}>45</option>

<option value="50" {$rpp50_selected}>50</option>

<option value="60" {$rpp60_selected}>60</option>

<option value="70" {$rpp70_selected}>70</option>

<option value="80" {$rpp80_selected}>80</option>

<option value="90" {$rpp90_selected}>90</option>

<option value="100" {$rpp100_selected}>100</option>

<option value="200" {$rpp200_selected}>200</option>

<option value="300" {$rpp300_selected}>300</option>

<option value="400" {$rpp400_selected}>400</option>

<option value="500" {$rpp500_selected}>500</option>

<option value="1000" {$rpp1000_selected}>1000</option>

</select> </TD></TR></TBODY></TABLE>{if $rowsfound}{if $allow_delete}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<A

onclick="var i; bSelected = !bSelected; if ((typeof frmAdmin.elements['mdelete[]'].length)=='undefined') frmAdmin.elements['mdelete[]'].checked=bSelected; else for (i=0;i<frmAdmin.elements['mdelete[]'].length;++i) frmAdmin.elements['mdelete[]'][i].checked=bSelected;"

href="#">{mlang_message tag="SELECT"}</A> &nbsp;&nbsp; <a href="#" onClick="if (confirm('{mlang_message tag="DELETE_CONFIRM"}')) frmAdmin.submit(); return false;">{mlang_message tag="DELETE_SELECTED"}</A> {/if}{if $allow_export}&nbsp;&nbsp; <A

onclick="var c=0; for (i=0;i<frmAdmin.elements['mdelete[]'].length;++i) if (frmAdmin.elements['mdelete[]'][i].checked) c=1; if(c==0) return true; frmAdmin.action='artikel_export.php';frmAdmin.target='_blank';frmAdmin.submit(); frmAdmin.action='artikel_list.php'; frmAdmin.target='_self';"

href="#">{mlang_message tag="EXPORT_SELECTED"}</A>{/if}{if $allow_export}&nbsp;&nbsp;

<A

onclick="var c=0; for (i=0;i<frmAdmin.elements['mdelete[]'].length;++i) if (frmAdmin.elements['mdelete[]'][i].checked) c=1; if(c==0) return true; frmAdmin.action='artikel_print.php';frmAdmin.target='_blank';frmAdmin.submit(); frmAdmin.action='artikel_list.php'; frmAdmin.target='_self';"

href="#">{mlang_message tag="PRINT_SELECTED"}</A>{/if}<!-- delete form -->

<FORM name=frmAdmin action=artikel_list.php method=post><input type=hidden id="a" name="a" value="delete">

<TABLE

style="BORDER-RIGHT: #c0c0c0 1px solid; BORDER-TOP: #c0c0c0 1px solid; BORDER-LEFT: #c0c0c0 1px solid; BORDER-BOTTOM: #c0c0c0 1px solid"

cellSpacing=2 cellPadding=3 width="95%" align=center border=0><!-- table header -->

<TBODY>

<TR class=blackshade vAlign=top><!--{if $column1show}-->{if $allow_edit}

<TD align=middle><IMG src="images/icon_edit.gif"></TD>{/if}{if $allow_add}

<TD align=middle><IMG src="images/icon_copy.gif"></TD>{/if}{if $allow_delete}

<TD align=middle></TD>{/if}

<TD>

<TABLE>

<TBODY>

<TR>

<TD class=blackshade><A class=blackshade

href="artikel_list.php?orderby={$order_dir_artikel_nr}artikel%5Fnr">nummer</A>

</TD>

<TD>{$order_image_artikel_nr}</TD></TR></TBODY></TABLE></TD>

<TD>

<TABLE>

<TBODY>

<TR>

<TD class=blackshade><A class=blackshade

href="artikel_list.php?orderby={$order_dir_artikel_ean}artikel%5Fean">ean</A>

</TD>

<TD>{$order_image_artikel_ean}</TD></TR></TBODY></TABLE></TD>

<TD>

<TABLE>

<TBODY>

<TR>

<TD class=blackshade><A class=blackshade

href="artikel_list.php?orderby={$order_dir_sturing_omschrijving}sturing%5Fomschrijving">status</A>

</TD>

<TD>{$order_image_sturing_omschrijving}</TD></TR></TBODY></TABLE></TD>

<TD>

<TABLE>

<TBODY>

<TR>

<TD class=blackshade><A class=blackshade

href="artikel_list.php?orderby={$order_dir_artikel_omschrijving}artikel%5Fomschrijving">omschrijving</A>

</TD>

<TD>{$order_image_artikel_omschrijving}</TD></TR></TBODY></TABLE></TD>

<TD>

<TABLE>

<TBODY>

<TR>

<TD class=blackshade><A class=blackshade

href="artikel_list.php?orderby={$order_dir_artikel_kleur}artikel%5Fkleur">kleur</A>

</TD>

<TD>{$order_image_artikel_kleur}</TD></TR></TBODY></TABLE></TD>

<TD>

<TABLE>

<TBODY>

<TR>

<TD class=blackshade><A class=blackshade

href="artikel_list.php?orderby={$order_dir_subgroep_id}subgroep%5Fid">subgroep</A>

</TD>

<TD>{$order_image_subgroep_id}</TD></TR></TBODY></TABLE></TD>

<TD>

<TABLE>

<TBODY>

<TR>

<TD class=blackshade><A class=blackshade

href="artikel_list.php?orderby={$order_dir_eenheid_id}eenheid%5Fid">eenheid</A>

</TD>

<TD>{$order_image_eenheid_id}</TD></TR></TBODY></TABLE></TD>

<TD>

<TABLE>

<TBODY>

<TR>

<TD class=blackshade><A class=blackshade

href="artikel_list.php?orderby={$order_dir_eenheidtype_id}eenheidtype%5Fid">eenheidtype</A>

</TD>

<TD>{$order_image_eenheidtype_id}</TD></TR></TBODY></TABLE></TD>

<TD>

<TABLE>

<TBODY>

<TR>

<TD class=blackshade><A class=blackshade

href="artikel_list.php?orderby={$order_dir_artikel_low}artikel%5Flow">LWM</A>

</TD>

<TD>{$order_image_artikel_low}</TD></TR></TBODY></TABLE></TD>

<TD>

<TABLE>

<TBODY>

<TR>

<TD class=blackshade><A class=blackshade

href="artikel_list.php?orderby={$order_dir_artikel_gewicht}artikel%5Fgewicht">gewicht</A>

</TD>

<TD>{$order_image_artikel_gewicht}</TD></TR></TBODY></TABLE></TD>

<TD>

<TABLE>

<TBODY>

<TR>

<TD class=blackshade><A class=blackshade

href="artikel_list.php?orderby={$order_dir_artikel_inhoud}artikel%5Finhoud">inhoud</A>

</TD>

<TD>{$order_image_artikel_inhoud}</TD></TR></TBODY></TABLE></TD><!--{/if}--></TR><!-- table data --><!--{foreach from=$rowinfo item=row}-->

<TR onmouseover="this.className = 'rowselected';"

onmouseout="this.className = '{$row.shadeclassname}';" vAlign=top

{$row.shadeclass}>{if $allow_edit}

<TD align=middle><A href="artikel_edit.php?{$row.1editlink}">{mlang_message tag="EDIT"}</A> &nbsp; </TD>{/if}{if $allow_add}

<TD align=middle><A href="artikel_add.php?{$row.1copylink}">{mlang_message tag="COPY"}</A> &nbsp;</TD>{/if}{if $allow_delete}

<TD align=middle><INPUT type=checkbox value="{$row.1recno}" name=mdelete[]>

<input type=hidden name="mdelete1[]" value="{$row.1id1}"><input type=hidden name="mdelete2[]" value="{$row.1id2}">&nbsp;</TD>{/if}

<TD>{$row.1artikel_nr_value} </TD>

<TD>{$row.1artikel_ean_value} </TD>

<TD>{$row.1sturing_omschrijving_value} </TD>

<TD>{$row.1artikel_omschrijving_value} </TD>

<TD>{$row.1artikel_kleur_value} </TD>

<TD>{$row.1subgroep_id_value} </TD>

<TD>{$row.1eenheid_id_value} </TD>

<TD>{$row.1eenheidtype_id_value} </TD>

<TD>{$row.1artikel_low_value} </TD>

<TD>{$row.1artikel_gewicht_value} </TD>

<TD>{$row.1artikel_inhoud_value} </TD><!--{/foreach}--></TR>{/if}{/if}</TBODY></TABLE></FORM>

<P>&nbsp;</P>

<P align=center><B>{$message}</B></P>{if $allow_search}{$pagination} {/if}{include_if_exists file="include/footer.php"}

</BODY></HTML>
Thanks.

J
Jane 4/6/2007

Hi,
you need to find your table name in this file (as I understand your table name is onderhoud artikel) and replace it with mlang tag:

{mlang_message tag="onderhoud artikel"}


Then build your project and modify generated include/languages.php file.

A
amplus author 4/10/2007

Hi Jane,
You told me that I can change the fieldlabel in : {mlang_message tag="TableName"} instead of your table names on the Visual Editor tab.

Now i will do it on the label page (step 6 of 12) in the field label i want put {mlang_message tag="kleur"} in there.

Now give the Visual Editor {mlang_message tag=&quot;kleur&quot;} instead of {mlang_message tag="kleur"}.
Can you help me and say what i do wrong.
Thanks.

J
Jane 4/10/2007

Hi,
you need to make all your changes on the Visual Editor tab, not on the Choose fields tab.