Support forum of the software localization tool Sisulizer


Localization Tool for VB, Delphi, .NET, C#, VB.NET, XML, Online Help, HTML ... Home

Get in contact with the makers of Sisulizer.
Our forum is open for all questions around Sisulizer from customers and prospects.
Don't hesitate to register and ask. The Sisulizer team will answer ASAP.

Search     Help Home Sisulizer Website Download
Search by username
Not logged in - Login | Register 

 Moderated by: Renate.Reinartz, Markus.Kreisel, Jaakko.Salmenius, Ilkka.Salmenius Page:    1  2  Next Page Last Page  
New Topic Reply Printer Friendly
Exclude translation of TLabel component with name lblNotTranslate - Usage - Three simple steps to localize - Technical Support (You need to be registered at the forum to write) - Localization Tool for VB, Delphi, .NET, C#, VB.NET, XML, Online Help, HTML ...
AuthorPost
 Posted: Mon Apr 28th, 2008 02:35 pm
PM Quote Reply
starvisitor
Member
 

Joined: Mon Apr 28th, 2008
Location:  
Posts: 14
Status: 
Offline
Hello!

I write a little delphi application an I use OnGuard to protect my application.
OnGuard components make it possible to make a demo version from your application, an I use it inside Delphi 2007 (OgUsage).

The users can start my app 30 times, then they have to register. This status informations are shown dynamically with a TLabel component and it's property "Caption"

Like...

    lblRegistrationCap.Font.Color := clGreen;
    lblRegistrationCap.Caption := RegisteredCap;

RegisteredCap is a dynamic String Value.

If I use now Sisulizer to translate my application to english, the lblRegistrationCap.Caption losts all registration status information - text.

How can I exclude this exact component "lblRegistrationCap" for translations?
The registration text-informations for users should not lost after a dynamically language change.

Notice: The registration string informations declared in variable "RegisteredCap" are not resourcestrings and so are excluded for translations so that can not be the problem.

Please help me to fix this "effect".

Back To Top PM Quote Reply

 Posted: Mon Apr 28th, 2008 02:52 pm
PM Quote Reply
Markus.Kreisel
Administrator


Joined: Sat Apr 8th, 2006
Location: Bedburg, Germany
Posts: 831
Status: 
Offline
Hi,

have you tried: Tools - Platforms - VCL - Properties? There you can exclude "lblRegistrationCap.Caption" from scanning.

Hope this helps

Markus



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Quote Reply

 Posted: Mon Apr 28th, 2008 03:03 pm
PM Quote Reply
starvisitor
Member
 

Joined: Mon Apr 28th, 2008
Location:  
Posts: 14
Status: 
Offline
Hello!

Not really - If I put this control to Tools - Platforms - VCL - Properties Sisulizer excludes me all components with property "Caption", so my app translation will not work for the other Label elements...

Other idea?

Back To Top PM Quote Reply

 Posted: Mon Apr 28th, 2008 03:22 pm
PM Quote Reply
Markus.Kreisel
Administrator


Joined: Sat Apr 8th, 2006
Location: Bedburg, Germany
Posts: 831
Status: 
Offline
You excluded "Caption"? Please try to exclude "lblRegistrationCap.Caption"
You should be also able to exclude "lblRegistrationCap.*".

Doesn't that work for you?

Best

Markus



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Quote Reply

 Posted: Mon Apr 28th, 2008 03:32 pm
PM Quote Reply
starvisitor
Member
 

Joined: Mon Apr 28th, 2008
Location:  
Posts: 14
Status: 
Offline
I have done it but if I build Sisulizer and start my exe, change language the effect happens again. Here I have but the Screen where I have placed your solution. But it does not work for me...

Attachment: lblExclude.jpg (Downloaded 38 times)

Back To Top PM Quote Reply

 Posted: Mon Apr 28th, 2008 03:42 pm
PM Quote Reply
Markus.Kreisel
Administrator


Joined: Sat Apr 8th, 2006
Location: Bedburg, Germany
Posts: 831
Status: 
Offline
Have you used "Scan For Chnages" after your change to the settings and before you build your EXE again?
Did Sisulizer mark the row with the unwanted string with a blue dot (unused) after Scan for Changes? (You might want to use Project - Remove unused strings to remove the row completely from the project).

Does this help?

Markus



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Quote Reply

 Posted: Mon Apr 28th, 2008 03:42 pm
PM Quote Reply
starvisitor
Member
 

Joined: Mon Apr 28th, 2008
Location:  
Posts: 14
Status: 
Offline
Here the "effect" Screens I have after changing language...

Attachment: problem-exclude-lblRegistra.jpg (Downloaded 38 times)

Back To Top PM Quote Reply

 Posted: Mon Apr 28th, 2008 03:56 pm
PM Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Espoo, Finland
Posts: 455
Status: 
Offline
Adding "lblRegistrationCap.*" to excluded proprties won't work because lblRegistrationCap is name of a component. There can be only property names in the list.

You have to exclude your lblRegistrationCap.Caption row by row.

Do you have a lblRegistrationCap labels in several Delphi forms? Or just in one form?

Attachment: Row.PNG (Downloaded 37 times)



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Quote Reply

 Posted: Mon Apr 28th, 2008 06:41 pm
PM Quote Reply
starvisitor
Member
 

Joined: Mon Apr 28th, 2008
Location:  
Posts: 14
Status: 
Offline
Yes I have exclude any row like your screen show now, have then scan sisulizer for changes, then build again. After starting my app - same effect as ever. I have the same effect on Combobox - TString Items too. They lost her default setting values...

How can I fix this bad "effect"? Please help me...Thanks

Back To Top PM Quote Reply

 Posted: Mon Apr 28th, 2008 06:51 pm
PM Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Espoo, Finland
Posts: 455
Status: 
Offline
If possible, could you send your SLP file and the EXE file to me.

support (at) sisulizer.fi



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Quote Reply

 Posted: Mon Apr 28th, 2008 06:59 pm
PM Quote Reply
starvisitor
Member
 

Joined: Mon Apr 28th, 2008
Location:  
Posts: 14
Status: 
Offline
Ok, but use it absolutely confiding...is that ok for you??

Back To Top PM Quote Reply

 Posted: Mon Apr 28th, 2008 07:01 pm
PM Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Espoo, Finland
Posts: 455
Status: 
Offline
Of course. Allways. I will delete all files from my computer after the case is solved.

best regards
Ilkka



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Quote Reply

 Posted: Mon Apr 28th, 2008 07:03 pm
PM Quote Reply
starvisitor
Member
 

Joined: Mon Apr 28th, 2008
Location:  
Posts: 14
Status: 
Offline
Ok, give me 5 minutes please - then you will have a email from me ;-)

Back To Top PM Quote Reply

 Posted: Mon Apr 28th, 2008 07:10 pm
PM Quote Reply
starvisitor
Member
 

Joined: Mon Apr 28th, 2008
Location:  
Posts: 14
Status: 
Offline
you have post now. please send me back only to my email-address if you wishes to contact me...thanks for help!

Back To Top PM Quote Reply

 Posted: Mon Apr 28th, 2008 07:12 pm
PM Quote Reply
starvisitor
Member
 

Joined: Mon Apr 28th, 2008
Location:  
Posts: 14
Status: 
Offline
sorry I have forgotten the slp file - i will send it now!

Back To Top PM Quote Reply

 Posted: Mon Apr 28th, 2008 07:38 pm
PM Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Espoo, Finland
Posts: 455
Status: 
Offline
Now I got your point. You are changing the language on runtime. When a language has been changed it will replace all the properties with new values. That's why lblRegistrationCap.Caption will be overwritten with the value that has been saved to the DFM file. In your case it is "Registration infos show here!"

You have two choices.

1. In Delphi IDE clear the Caption "Registration infos show here!". After that no Caption property will be stored to DFM file. Loding the new language doesn't overwrite the existing value.

2. After changing the language on runtime reassign the Caption property.

regards
Ilkka



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Quote Reply

 Posted: Mon Apr 28th, 2008 07:43 pm
PM Quote Reply
starvisitor
Member
 

Joined: Mon Apr 28th, 2008
Location:  
Posts: 14
Status: 
Offline
Ok, thanks. Then I will test it with choice 1., because the timer lefts 1 value each time you start my application in demo mode. So I will set the caption property to blank and leave it empty. I will try it out and give you feedback...
thanks for help!

Back To Top PM Quote Reply

 Posted: Mon Apr 28th, 2008 08:15 pm
PM Quote Reply
starvisitor
Member
 

Joined: Mon Apr 28th, 2008
Location:  
Posts: 14
Status: 
Offline
I have to change some details on code. But it works now.
Thanks for your help!!!

Regards from germany

starvisitor

Back To Top PM Quote Reply

 Posted: Mon Apr 28th, 2008 11:59 pm
PM Quote Reply
Jaakko.Salmenius
Administrator


Joined: Sat Apr 8th, 2006
Location: Tokyo, Japan
Posts: 1641
Status: 
Online
There is one other way to control what to translate. LaTranslator unit contains global event called LaBeforeTranslate. You can use it to disable translation of a property or component. Add the following code to your main form.

procedure BeforeTranslate(
  host: TComponent;
  obj: TObject;
  propertyInfo: PPropInfo;
  const currentValue: Variant;
  var newValue: Variant;
  var cancel: Boolean);
begin
  cancel := obj = Form1.lblRegistrationCap;
end;


This is an event that TLaTranslator calls evey time before it assigns a translated property value. If you set cancel property to False TLaTranslator does not assign the property but its value remains in the current state.

You also have to assing the event to TLaTranslator by using the following code in your main form.

initialization
  LaBeforeTranslate := BeforeTranslate;
end.


<sldir>\VCL\DelphiWin\Events contains a sample that demonstrates this.

Jaakko



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Quote Reply

 Posted: Tue Apr 29th, 2008 06:42 am
PM Quote Reply
starvisitor
Member
 

Joined: Mon Apr 28th, 2008
Location:  
Posts: 14
Status: 
Offline
Hello Jaakko!
I have implement your solution, gave lblRegistrationCap the initialize caption value "Registration infos show here!" back, and implement this code:

+++++++++++++++++++++++++++++++++++++++++++

procedure BeforeTranslate(host: TComponent; obj: TObject; propertyInfo: PPropInfo; const currentValue: Variant; var newValue: Variant; var cancel: Boolean);
begin
cancel := obj = Form1.lblRegistrationCap;
cancel := obj = Form1.cboJComp;
cancel := obj = Form1.cboRes;
end;


initialization
LaBeforeTranslate := BeforeTranslate;

++++++++++++++++++++++++++++++++++++++++++++++

Build my exe, run it and...the "effect" comes again.
Your solution is more flexible, but it don't work for me.
Have you an answer for that?

Thanks for your helping hand!

starvisitor

Back To Top PM Quote Reply

Current time is 08:05 am Page:    1  2  Next Page Last Page    
Localization Tool for VB, Delphi, .NET, C#, VB.NET, XML, Online Help, HTML ... > Technical Support (You need to be registered at the forum to write) > Usage - Three simple steps to localize > Exclude translation of TLabel component with name lblNotTranslate



WowUltra 1.11 Copyright © 2007 by Jim Hale - Based on WowBB Copyright © 2003-2006 Aycan Gulez

Sisulizer software localization tool - Three simple steps to localize