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

Smarty TPL-Parser für I18N-Projekte

 
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 -> Language: German
View previous topic :: View next topic  
Author Message
ibisIT
Smarty n00b


Joined: 06 Dec 2013
Posts: 1

PostPosted: Fri Dec 06, 2013 1:47 pm    Post subject: Smarty TPL-Parser für I18N-Projekte Reply with quote

Hallo,

Ich habe kürzlich ein Projekt gehabt, in dem eine PHP Webseite, die Smarty verwendet, mehrsprachig werden sollte. Ich hatte mich dafür entschlossen mit .po-Dateien zu arbeiten und das Zend Framework 2 für die Übersetzung zu nutzen. Die direkte Verwendung von gettext war mir nicht flexibel genug, weil dort die Sprachdateien vom Webserver gecached werden.

Problematisch war blos, dass Poedit (Übersetzungstool) und der dort verwendete Parser xgettext zwar PHP parst, aber mit den Smarty-Templates nichts anfangen kann. Daher habe ich mir Abhilfe geschaffen und selber einen Parser geschrieben den man in Poedit einfügen kann.

Ich habe mich entschlossen, das Tool online zu stellen und für die freie Benutzung freizugeben:
http://www.ibis-it.de/downloads/gettext_smarty

Es gibt schon relativ lange ein vergleichbare Lösung als OpenSource-Projekt: http://sourceforge.net/projects/smarty-gettext/
Allerdings fand ich dort die Verwendung einer PHP-Datei als Skript auf dem Entwicklungs-PC ungünstig. Zudem dort auch keine .PO-Datei erzeugt, sondern eine C-Datei erzeugt wird, die von Poedit geparst werden kann.

Vielleicht könnt ihr damit ja was anfangen.
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 -> Language: German 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