|Anonymous | Login | Signup for a new account||2018-12-11 20:34 CET|
|Main | My View | View Issues | Change Log | Roadmap | Docs|
|Viewing Issue Simple Details|
|ID||Category||Severity||Reproducibility||Date Submitted||Last Update|
|0003199||[JEDI VCL] 00 JVCL Components||feature||N/A||2005-09-16 07:04||2006-04-14 04:20|
|Summary||0003199: JvgLanguageLoader additions|
As per request in the newsgroup here's my version of JvgLanguageLoader.
If you want I can make an example but I do not have much time at the moment.
Changes and additions in my version:
* uses TIniFile to load translations. Every form has a section and string constants have a separate section.
- lofTrimSpaces doesn't work because TIniFile alsways trims
+ DictionaryFileName: stores filename with translations
+ FormSection: section name in translations file of form to translate
+ StringsSection: section name of string constants
+ IgnoreList: contains items to ignore when translating
String constant translations are kept in a seperate stringlist and can be used whenever a constant needs to be translated, using function Translate(const Text: string): string;
To translate a form use
procedure TranslateComponent(Component: TComponent; DoLoadStrings: Boolean);
If DoLoadStrings is true the string constants are also loaded
To change translations:
procedure ChangeTranslation(Component: TComponent; DoLoadStrings: Boolean; OldLanguageFileName: string);
Where OldLanguageFileName should contain the current file with the current translation and property DictionaryFileName should contain the new translation file.
|Tags||No tags attached.|
JvgLanguageLoader.zip [^] (5,977 bytes) 2005-09-16 07:04
LanguageLoaderExample.zip [^] (4,019 bytes) 2006-04-08 09:16
|If you have time, yes, I would appreciate a demo application.|
I would propably suggest to use the JvAppStorage for the definitions. It's much more flexible then the inifile.
|It would be better indeed, but as this is a Globus component, its life in the JVCL may not be too long anymore. I'm not saying it will disappear, but it will be deprecated at some point in time. See the roadmap for details.|
Here's the example as requested. Nothing fancy but it shows how it works.
Note: the program expects to find the language files in the same directory as the exe.
This is now all in CVS.
But please, should you submit code in the future, please respect the STYLE GUIDE. It is very annoying to clean up the source code.
|2005-09-16 07:04||boerema1||New Issue|
|2005-09-16 07:04||boerema1||File Added: JvgLanguageLoader.zip|
|2006-04-03 05:56||obones||Note Added: 0008837|
|2006-04-03 05:56||obones||Status||new => feedback|
|2006-04-03 06:51||jfudickar||Note Added: 0008840|
|2006-04-03 13:06||obones||Note Added: 0008848|
|2006-04-08 09:16||boerema1||Note Added: 0009040|
|2006-04-08 09:16||boerema1||File Added: LanguageLoaderExample.zip|
|2006-04-12 01:09||obones||Status||feedback => acknowledged|
|2006-04-14 04:20||obones||Status||acknowledged => resolved|
|2006-04-14 04:20||obones||Resolution||open => fixed|
|2006-04-14 04:20||obones||Assigned To||=> obones|
|2006-04-14 04:20||obones||Note Added: 0009105|
|Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group|