GregTomkins
Active Member
We have a Progress app that has been translated (over many years and at great cost) using standard Progress utilities.
Now, we are JavaScriptifying our front end, and we have a strong desire that it reuse all the existing translations. We will be maintaining both 4GL and JavaScript for the foreseeable future.
Our approach to this problem is:
Now, we are JavaScriptifying our front end, and we have a strong desire that it reuse all the existing translations. We will be maintaining both 4GL and JavaScript for the foreseeable future.
Our approach to this problem is:
- Our JavaScript says eg. $('#acct').html(getTranslation('Account'));
- A utility parses the JS for 'getTranslation' and creates a .p containing the words that we care about.
- We run this .p through the compiler and to produce a mapping file (eg. 'Account=Compte').
- The 'getTranslation' function uses this mapping file to look up the correct word.