|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
trurl Smarty n00b
Joined: 10 Jul 2013 Posts: 2
|
Posted: Wed Jul 10, 2013 1:23 pm Post subject: Localising a project written in smarty+php |
|
|
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 |
|
trurl Smarty n00b
Joined: 10 Jul 2013 Posts: 2
|
Posted: Thu Jul 18, 2013 11:59 am Post subject: |
|
|
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 |
|
|
|
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
|