Tag (and eventually Translate) PHP files
Thread poster: Dudu Koren

Dudu Koren  Identity Verified
Israel
Local time: 19:15
Member (2010)
English to Hebrew
Jan 3, 2011

Hello,

Using Translator workbench & TagEditor 8.2.0.835

I try to translate some tpl (template) files of a website using Trados.
The files are actually mix of HTML and PHP.
Trados doesn't tag php code, i didn't mind about that because i can just
go over the code segments and translate only required text.
The problem comes when i create the translated documents.
All "&" signs are replaced by & and the code becomes corrupted.


So my question is: is there a way to force Trados not to change this
special characters (& for example)?
It would have been great if i can just tag all PHP code (it's mostly between
{ and } signs) but i have no idea how to do this. Tried Preptags and this all
regex thing looks a bit too complicated for me.

Would love to hear your ideas.
Thanks!

some example from the original file:



Features :
{if $sm.sel_features && !$smarty.session.id_admin}
{html_multi_checkboxes name="room[features]"
options=$sm.room_features selected=$sm.sel_features columns=2
disabled="disabled"}
{else}
{html_multi_checkboxes name="room[features]"
options=$sm.room_features selected=$sm.sel_features columns=2}
{/if}
Please select atleast one feature.




Room View

{if $sm.imgs}
{section name=cur loop=$sm.imgs}
{assign var=x value=$sm.imgs[cur]}

%7B$sm.thumb_path%7D%7B$x.id_%20%20room%7D_%7B$x.image_name%7D


{if $smarty.section.cur.iteration % 2 ==0}

{/if}
{sectionelse}
No Images
{/section}



 

Soonthon LUPKITARO(Ph.D.)  Identity Verified
Thailand
Local time: 23:15
Member (2004)
English to Thai
+ ...
DTD setting files Jan 3, 2011

In TagEditor, you can set tags of special PHP/HTML codes in DTD setting file (*.ini format). Go to menu of Option/tag settings.
Alternatively, I use *.itd (SDLX in T2007 package) format to translate PHP/HTML files with less troubles.

Soonthon Lupkitaro


 

Heinrich Pesch  Identity Verified
Finland
Local time: 19:15
Member (2003)
Finnish to German
+ ...
Easier in Word Jan 3, 2011

I would use Wordfast in Word for php. You can select the chunk that needs to be translated and don't change anything else.

 

Dudu Koren  Identity Verified
Israel
Local time: 19:15
Member (2010)
English to Hebrew
TOPIC STARTER
Thanks a lot for the ideas Heinrich and Soonthon! Jan 4, 2011

I'll consider your suggestions

 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Tag (and eventually Translate) PHP files

Advanced search







Déjà Vu X3
Try it, Love it

Find out why Déjà Vu is today the most flexible, customizable and user-friendly tool on the market. See the brand new features in action: *Completely redesigned user interface *Live Preview *Inline spell checking *Inline

More info »
Protemos translation business management system
Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!

The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search