I need a clue for a good component to work with languages

Posted on 2006-07-24
Last Modified: 2012-05-05
Hello guys,

I am developing a program and it will be translated for 3 languages, portuguese - english and spanish, I would like to know if there is a good component to work with.

One that allows me to change the language in run time.
Thanks very much
Question by:hidrau
  • 3
  • 2
LVL 28

Expert Comment

ID: 17166881
why not use the languages support provided by delphi?
LVL 28

Accepted Solution

2266180 earned 300 total points
ID: 17166902

Author Comment

ID: 17166905
If I understood correctly, I only use it to compile my project in the language that I want. It didn't allow to exchange the language in run time.
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

LVL 28

Expert Comment

ID: 17166911
the paq I gave you should clear that issue :)
LVL 12

Assisted Solution

Ivanov_G earned 200 total points
ID: 17169923
According to me, you should make the translation by yourself. It is easy and you can customize it very well.

1) First of all, you can use Unicode controls (like TNT controls). If later you have to translate to Chinese for e.g. you will be ready.
2) Create TBaseForm, which is inherited by all other forms. Make a Translate method for it.
3) You translate method can use XML for captions. Example:

  <form name="Form1">
    <Label1>Your caption here:</Label1>
    <Edit1>Edit text here</Edit1>

4) Your translate method should do something like this:

  for i:=0 to Self.ComponentCount -1 do
     if (Self.Components[i] is TLabel) then
         (Self.Components[i] as TLabel).Caption = 'YOUR_PARSED_VALUE_FROM_XML';
         // you can set hint also
     if (Self.Components[i] is TEdit) then
         (Self.Components[i] as TEdit).Text= 'YOUR_PARSED_VALUE_FROM_XML';
         // you can set hint also

For XML parsing you can use TXMLDocument.

Hope this helps.

Author Comment

ID: 17286791
Thanks guys

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question