Kornel Lesinski <kor...@...> writes:

> 
> On 11 Jun 2009, at 18:03, michal wrote:
> >
> > I have created automatic translation system.
> 
> BTW: PHPTAL has support for custom translation solutions, see  
> PHPTAL_TranslationService interface.
> 
> > And from the point of view of
> > class that inherit translated words there is problem with loops  
> > inside template
> > that they have to be inside of array.
> > I have some function like
> > $lang->load('admin_panel',$tpl); $tpl is pass through reference and  
> > all
> > translation is inside $tpl.
> 
> You shouldn't be doing this. Don't spread PHPTAL as dependency all  
> over the application.
> 
> > The problem is with structure of data.
> > I have temporary solution that $translation_obj contains all  
> > translated word as
> > object(and is accesible, $tpl is not).
> > $translation_obj = $lang->load('admin_panel',$tpl);
> > But that would be faster and more coniniet to have possiblity to  
> > access $tpl
> > directly like
> > echo $tpl->manage
> > or echo $tpl->get('manage');
> 
> Well, it certainly wouldn't be faster, because access to variables  
> from PHPTAL object is quite slow (they are stored in this object).
> 
> And I really don't get it why do you want to use PHPTAL class for  
> managing translations, rather than some other class that's designed  
> for that purpose.
> 

Let me clear what I want.
My application consist of many files(pages) so I decide to store my translation 
in separate json files. One translation file for one www page. Every time I 
load page, translation is taken from json file and loaded into application and 
$tpl-> object. Than I can use it inside xhtml(template). 

I try to understand the translation system in PHPTAL. PHP  part of t. system is 
not clear for me.

What I want is to have easy to use ,fast translation system with many 
tranlation files, because one file with translation would slow down application.

1. Do you have code of simple working application using translation system.
2. Do I have to use .po files if I use i18n:translate tags?

Greetings
Michal


_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to