Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

multilanguage

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
zanabuna
Smarty Rookie


Joined: 04 Aug 2005
Posts: 8

PostPosted: Wed Nov 09, 2005 10:45 am    Post subject: multilanguage Reply with quote

I want to make the multilanguage plugin http://smarty.incutio.com/?page=SmartyMultiLanguageSupport work.
But I just don't know how...

Could you please help me ?

<?
include '../include/smarty/multilanguage.php';

//*********** smarty initialization
$smarty = new SmartyML('en');
$smarty->display('template.tpl');
?>


template.tpl:
##TEST STRING##

english language file located in:
root->/languages/en/global.lng

I'm getting this:
Warning: Invalid argument supplied for foreach() in d:\http\personal\include\smarty\multilanguage.php on line 249:

249: foreach ($this->_loadedTranslationTables[$this->_currentLanguage] as $table) {


The output is:
TEST STRING
the ## were eliminated....


SOMEBODY PLEASE HELP !!!!
Back to top
View user's profile Send private message
zanabuna
Smarty Rookie


Joined: 04 Aug 2005
Posts: 8

PostPosted: Wed Nov 09, 2005 11:02 am    Post subject: okay -> finished Reply with quote

Okay.. sorry..
Figured it out eventually... Embarassed
Back to top
View user's profile Send private message
stakabo
Smarty n00b


Joined: 23 Nov 2005
Posts: 2
Location: Montreal

PostPosted: Wed Nov 23, 2005 6:43 pm    Post subject: Reply with quote

hi !

i have the same probleme ...

how did you fix it ?

thanx
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
stakabo
Smarty n00b


Joined: 23 Nov 2005
Posts: 2
Location: Montreal

PostPosted: Wed Nov 23, 2005 9:21 pm    Post subject: i figure out what was wrong ... Reply with quote

hi !

i feel kinda dumb spending so much time on this, but i figure out why it did not work. it all had to do with text encoding.

make sure the app you use to make the .lng file has the line break type set to LF (UNIX). in my case, it was set to CR (mac).

hope this can help some nice apple user !
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Bajki
Smarty Rookie


Joined: 11 Jul 2006
Posts: 9

PostPosted: Sun Nov 23, 2008 12:13 am    Post subject: Reply with quote

i have the same problem.
I've set line brake type to LF and i'm getting the word that is between ## instead of it's translation.

Can anyone help me ? Wink
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP