Telegram_2023-09-29T15

<< Click to Display Table of Contents >>

Navigation:  Telegram > 2023 > 09 > 29 >

Telegram_2023-09-29T15

Telegram link

 

2023-09-29T15:34:58

 

could you please suggest the best strategy to localize iw app on the user choice language? we are using master html templates. Thank you

 


 

Telegram link

 

2023-09-29T15:36:18

 

I was also looking for an alternative, but ended up implementing my own solution

 


 

Telegram link

 

2023-09-29T15:37:16

 

one thing to be aware of: you need to turn the IW template cache OFF (if you are using one of the latest versions)

 


 

Telegram link

 

2023-09-29T15:41:43

 

Portuguese/English

 


 

Telegram link

 

2023-09-29T15:43:23

 

are you choosing the translated text to render on server side? do you have a dictionary? are you using JS to get the translated text?

 


 

Telegram link

 

2023-09-29T15:44:16

 

do you have different html templates for every language?

 


 

Telegram link

 

2023-09-29T15:44:27

 

All text comes from the Server Side; every form/frame/unit has its own translation file;every language has its own folder

 


 

Telegram link

 

2023-09-29T15:44:38

 

no, just one template

 


 

Telegram link

 

2023-09-29T15:44:57

 

I came to my mind with this \solutions\.

 


 

Telegram link

 

2023-09-29T15:46:11

 

thank you. Any other ideas will be appreciatted

 


 

Telegram link

 

2023-09-29T15:46:54

 

I ended up writing code like this for every string

 

type: code procedure TfrmLogin.TranslateUI;

 

begin

 

btnChangePassword.Caption := fTranslator.Translate('btnChangePassword');

 

lblEmail.Caption := fTranslator.Translate('lblEmail');

 

lblPassword.Caption := fTranslator.Translate('lblPassword');

 

btnLogin.Caption := fTranslator.Translate('btnLogin');

 

lnkForgotPassword.Caption := fTranslator.Translate('lnkForgotPassword');

 

lnkCreateAccount.Caption := fTranslator.Translate('lnkCreateAccount');

 

btnCancel.Caption := fTranslator.Translate('btnCancel');

 

lblPageTitle.Caption := fTranslator.Translate('lblPageTitleWelcome');

 

end;

 


 

Telegram link

 

2023-09-29T15:50:42

 

a lot of work. :-)

 


 

Telegram link

 

2023-09-29T15:52:59

 

a bit, but once is done, is done ??

 

I can't see a way to automate this process yet

 


 

Telegram link

 

2023-09-29T15:53:52

 

specially strings used in classes, like type descriptions

 


 

Telegram link

 

2023-09-29T15:56:12

 

for example:

 

type: code function TSEOLKeywordStatusHelper.Description: string;

 

begin

 

case Self of

 

Candidates: Result := Translate('msgStatusCandidates');

 

Discarded: Result := Translate('msgStatusDiscarded');

 

NegativeKeyword: Result := Translate('msgStatusNegativeKeyword');

 

TrustedKeyword: Result := Translate('msgStatusTrustedKeyword');

 

NegativeTrustedKeyword: Result := Translate('msgStatusNegativeTrustedKeyword');

 

NotCandidates: Result := Translate('msgStatusNotCandidates');

 

AllKeywords: Result := Translate('msgStatusAllKeywords');

 

end;

 

end;

 


 

Telegram link

 

2023-09-29T15:56:43

 

it allows me to translate everything in my app... a bit of work, but the results are very good