Beruflich Dokumente
Kultur Dokumente
in HTML code :
<form name="langForm" id="langForm" action="<?php echo base_url().'welcome/langu
ages';?>" method="post">
<?php // 'welcome' - [Home page controller] ?>
<input type="hidden" name="dlang" id="dlang">
<?php // 'dlang' - [Language choosen] ?>
<input type="hidden" name="current" id="current" value="<?php echo substr(uri_st
ring(),1,strlen(uri_string()));?>">
<?php // 'current' - [Current page url] ?>
<?php // [Language images] ?>
<img src="<?=base_url()?>images/fr.png" onClick="lanfTrans('fr');" width="16" he
ight="11" title="To French">
<img src="<?=base_url()?>images/en.png" onClick="lanfTrans('en');" width="16" he
ight="11" title="To English">
<img src="<?=base_url()?>images/es_flag.gif" onClick="lanfTrans('es');" width="1
6" height="11" title="To Spanish">
<?php echo form_close(); ?>
In the view pages, use below code to translate one language to another.
<?php translate("Welcome to codeigniter",$lang);?>
It will convert these text according to language choosed.
Limitations:
1) This contribution is not working in offline mode.
2) At a time we can translate 5000 characters.