for a specific language file for component installation - Joomla! Forum - community, help and support


hi,

i solved similar problem under j1.7 script doesn't work under j2.5. i'm coming here see if me.

i check if admin site language en-gb, if not therefore force component installation use en-gb text file component has.

how can ?

under j1.7 wrote following code, under j2.5 doesn't work :-(

code: select all

function preflight( $type, $parent) {
 $lang =& jfactory::getlanguage();
 $ltag = $lang->gettag();
   
 echo "<p>language tag: ".$ltag."</p>";
      
 if($ltag != 'en-gb') {
  $base_dir = jpath_administrator;
  $ltag = 'en-gb';
  $reload = true;
 }
 
 $res= $lang->load('com_rgtcis', $base_dir, $ltag, $reload);
 echo "<p>folder: ".$base_dir."</p><p>result: ".$res."</p>";


if test code on j2.5 admin site in french, load french language of component :( , not english.
$res = null :(

so mistake ?
thx






Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support