This is a component written in Delphi that works with VCL and FMX and can be used to localize (translate) your Windows/iOS/Android applications. You'll have to install a component in the IDE in order to load the localized strings stored in a
file; this file will be created using the apposite Editor.You can't view the links! Click here to registerThere is a Default language which contains the IDs of the strings. You can add using the apposite buttons new words or language and once you're done store your work in a json file. In the sections below I'll show you how to install everything properly and then run an example.You can't view the links! Click here to registerUsage
You can't view the links! Click here to register
Now you have finished the setup and you can start using the component. This code shows how to initialize the component in the
and then how to localize strings.
The
file with the localizations will be attached to you executable and it will increase the final size but consider that a json file is basically a text file with some chars inside so it's not huge. In a project of mine there are 4 languages with 50 words each and the file size it's less than 5 kb.
Code:
.json
- Open the editor and create a New Language File using the apposite button above (or use Browse to open a file if you had already created one). Now you can use the buttons to add words/languages and the table to edit the values that you want to assign to the localized strings. I have created this as example:
You can't view the links! Click here to register
- Once you have finished, click Save Edits and open Delphi. Create a new project (VCL or FMX), drop the
Code:
ProjectLanguages.bpl
- Now go on Project > Resources and Images > Add... > select the
Code:
ProjectLanguages.bpl
Now you have finished the setup and you can start using the component. This code shows how to initialize the component in the
Code:
Compile
Code:
Build
Code:
Install