|
From: Phil D. <ph...@lo...> - 2014-05-23 06:52:32
|
Well we only really need the translation so yes if we have it in some Z script that would be as good as anywhere then whenever the system comes accross a _($myrow['typename']) the translation should be fine. We just need to grep/ack for $myrow['typename'] and replace with _($myrow['typename']) in echo/printf statements. The script doesn't really need to run at all - we just need the strings in the translation messages.po to be available for translation. Phil Phil Daintree Logic Works Ltd - +64 (0)275 567890 http://www.logicworks.co.nz On 23/05/14 07:01, Rafael Chacón wrote: > Hi Phil, > > If we use translatable variables, I see 3 options: > > 1. Translatable variables in any script (e.g. the end of LanguageSetup.php). > Pro: Translation. > Cons: slow the script. > > 2. In a script called by install/index.php (or inside install/index). > Pro: Read one time, no time delay in "operating" scripts. > > 3. In a "Z_SysTypes.php" script called: (a) by install/index.php as a > database setup to load systypes table; (b) by "Utilities" menu as a > re-set for the systypes table. > Pro: An additional option. Code more clear and reusable. > Cons: couldslower the setup (two steps instead of one)? > > Best regards, Rafael. > > > > 2014-05-22 2:19 GMT-06:00 Phil Daintree <ph...@lo... > <mailto:ph...@lo...>>: > > Sorry Rafael ... my suggestion is obviously the same as your > suggestion at 2 - sorry. > > Phil > > Phil Daintree > Logic Works Ltd -+64 (0)275 567890 <tel:%2B64%20%280%29275%20567890> > http://www.logicworks.co.nz > > On 22/05/14 07:00, Rafael Chacón wrote: >> Hi, >> >> The values of "typename" column of the table "systypes" are in >> English. They are used as they are in this column. Almost all of >> the terms do not appear in the dictionary of translations *.po. >> >> To translate this, I found two solutions: >> >> 1.Directly overwrite the database with the local language. >> >> 2. Create a script "Z_SysTypes.php" containing an array of these >> "typename" as line-to-translate, rebuild the languages files, and >> translate. E.g. >> >> Z_SysTypes.php: >> $SysType['0'] = _('Journal - GL'); >> $SysType['1'] = _('Payment - GL'); >> $SysType['2'] = _('Receipt - GL'); >> ... >> $SysType['42'] = _('Asset Category Change'); >> >> >> >> I want a general purpose solution to add to main code (not only >> for my local installations). >> >> What you you think is the best solution? Reviews? Recommendations? >> Suggestions? >> >> Best regards, Rafael. >> >> >> ------------------------------------------------------------------------------ >> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >> Instantly run your Selenium tests across 300+ browser/OS combos. >> Get unparalleled scalability from the best Selenium testing platform available >> Simple to use. Nothing to install. Get started now for free." >> http://p.sf.net/sfu/SauceLabs >> >> >> _______________________________________________ >> Web-erp-developers mailing list >> Web...@li... <mailto:Web...@li...> >> https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform > available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > <mailto:Web...@li...> > https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > > > > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers |