Quantcast
Channel: Delphi Forum - Delphi Programming Kings of Code - Delphi Components
Viewing all articles
Browse latest Browse all 1331

TLanguages-Localization tool for VCL and FMX

$
0
0
 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 
Code:
.json
 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
  1. 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
  1. Once you have finished, click Save Edits and open Delphi. Create a new project (VCL or FMX), drop the 
    Code:
    ProjectLanguages.bpl
    component in the form. Just as test, add a TLabel component in the form.
  2. Now go on Project > Resources and Images > Add... > select the 
    Code:
    ProjectLanguages.bpl
     file generated with the Editor > give it an Identifier > select RCDATA as type > click Ok.

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
 and then how to localize strings.
Code:
Build
The 
Code:
Install
 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.


Viewing all articles
Browse latest Browse all 1331

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>