开源软件名称(OpenSource Name):albertodev01/TLanguages开源软件地址(OpenSource Url):https://github.com/albertodev01/TLanguages开源编程语言(OpenSource Language):Pascal 100.0%开源软件介绍(OpenSource Introduction):TLanguagesThis 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 There 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. InstallTo install the component just follow these steps:
Do not forget to add the source files to the library path of the IDE. To do this go on Tools > Options > Delphi Options > Library and for each platform add the path to the folder containing the sources of the component. Now you just need to open the Editor folder, open Usage
Now you have finished the setup and you can start using the component. This code shows how to initialize the component in the procedure TForm1.FormCreate(Sender: TObject);
begin
//The 'jsonResourceId' is the Identifier I was talking about on point number 3
Language1.setSource('jsonResourceId');
Language1.setLanguage('Default');
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Language1.setLanguage('it');
//The caption is now 'casa'
Label1.Caption := Language1.localize('home');
Language1.setLanguage('fr');
//The caption is now 'maison'
Label1.Caption := Language1.localize('home');
end; The |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论