Solved

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

Posted on 2006-07-24
6
189 Views
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
0
Comment
Question by:hidrau
  • 3
  • 2
6 Comments
 
LVL 28

Expert Comment

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

Accepted Solution

by:
ciuly earned 300 total points
ID: 17166902
0
 
LVL 1

Author Comment

by:hidrau
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.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 28

Expert Comment

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

Assisted Solution

by:Ivanov_G
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:

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

4) Your translate method should do something like this:

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

For XML parsing you can use TXMLDocument.

Hope this helps.
0
 
LVL 1

Author Comment

by:hidrau
ID: 17286791
Thanks guys
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

760 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now