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

Localising a project written in smarty+php

 
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
trurl
Smarty n00b


Joined: 10 Jul 2013
Posts: 2

PostPosted: Wed Jul 10, 2013 1:23 pm    Post subject: Localising a project written in smarty+php Reply with quote

Hello, this is my first post here, so please be gentle:)

We got the source code of a project (in Japanese), and we'll have to get it localised to English.

How would you go about it? Is there a pattern / regex I can use to identify the localisable parts of the source code? We'll have very limited dev support.

thanks
trurl
Back to top
View user's profile Send private message
trurl
Smarty n00b


Joined: 10 Jul 2013
Posts: 2

PostPosted: Thu Jul 18, 2013 11:59 am    Post subject: Reply with quote

Not much interest here... Anyway, this is what I have so far:

- read the source code into a proper CAT tool.
- use regular expressions* to lock everything you don't want to touch
- replace all exposed strings with StringID1, StringID2, ... in source code
- create xls table with StringID, SourceText, Translation1, Translation2
- hand over modified source code and xls to developer


*this is the regex filter I have atm:
\<.*?\>=.*?\> (html tags)
<(?!br\s*\/?)[^>]+> (for e.g. <br/>)
\{\*.*?\*\} (for the comments)
\{[^#.*?#].*?\} (for the variables)

I hope this will spark some interest and/or abuse:)

thanks
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