Translate FMX.consts

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
g.buonfini
Posts: 2
Joined: Thu May 06, 2021 9:22 am

Translate FMX.consts

Post by g.buonfini »

Hello everyone

I have a question about translating some resourcestring.

- FMX project on Delphi 10.4
- Tsilang 7.8.4

I need to translate the strings in the system menu items (Services, Hide, Hide Others and Quit)

Image

This items are added automatically in Delphi 10.4 applications, so do not need to be added by the developer

The strings are found in the FMX.consts file.

Is it possible to translate them?
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Re: Translate FMX.consts

Post by isiticov »

Hello,

I believe these strings (on the screenshot) and commands are added by Mac OS itself and it will be impossible to change them.
But to translate strings declared in FMX.Consts.pas you can try the following trick:
1. Copy FMX.Consts.pas to you project's folder.
2. Modify it by changing resourcestring to var or const and declare them as strings.
3. Add this unit to your project.
4. Translate it with TsiLang Expert as you do for the regular units without form in your project.
5. Try to place FMX.Consts.pas at the top of the uses clause of your project file.
6. Re-build your project.

Hope this helps.
Best regards,
Igor Siticov.
g.buonfini
Posts: 2
Joined: Thu May 06, 2021 9:22 am

Re: Translate FMX.consts

Post by g.buonfini »

Thank you very much for the quick reply.
i tried to perform the steps you told me but it didn't work properly for me.
do you think there could be another way to modify those resourcestring?

Thanks for the support
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Re: Translate FMX.consts

Post by isiticov »

Hello,

What do you mean under "those resourcestrings"? Strings that are listed in system menu: Hide, Hide Others and Quit? If yes, then you can't translate them as I think they are from the OS and Mac OS adds them not RAD Studio.
Best regards,
Igor Siticov.
Post Reply