Forums Sign Up Reply Search Statistics
Fast Template GraFX Software Solutions - Forum / Fast Template /

Lang files

 
Author rr1024
Forums Member
#1 Posted: 19 Nov 2007 17:41:27
Reply 
I was looking at the lang demo and I was wondering if it is possible to use a lang file where it was in an array like


$Lang['c_text1'] = "Text1";
$Lang['c_text2'] = "Text2";
$Lang['c_text3'] = "Text3";
$Lang['c_backindex'] = "Back to index";

Or what if the lang is like so

$Lang['text1'] = "Text1";
$Lang['text2'] = "Text2";
$Lang['text3'] = "Text3";
$Lang['backindex'] = "Back to index";

Then what would be the best approach for using lang files with fast template?
Author software
Admin
#2 Posted: 21 Nov 2007 13:23:33
Reply 
//thi scan be a possible hack
$Lang['text1'] = "Text1";
$Lang['text2'] = "Text2";
$Lang['text3'] = "Text3";
$Lang['backindex'] = "Back to index";

// just extract your lang table into variables with lang_vars prefix
extract($Lang, EXTR_PREFIX_ALL, "lang_vars");

//.........
// after this you can use ft
$ft->multiple_assign("lang_vars");
 
Your Reply

» Username  » Password 
Only registered users are allowed to post here. Please enter your login/password details upon posting a message, or sign up first.