View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003199 | JEDI VCL | 00 JVCL Components | public | 2005-09-16 07:04 | 2006-04-14 04:20 |
Reporter | boerema1 | Assigned To | obones | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | resolved | Resolution | fixed | ||
Product Version | 3.00 | ||||
Target Version | Fixed in Version | 3.30 | |||
Summary | 0003199: JvgLanguageLoader additions | ||||
Description | 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 Added properties: + 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. | ||||
2005-09-16 07:04
|
JvgLanguageLoader.zip (5,977 bytes) |
|
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. Greetings Jens |
|
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. |
2006-04-08 09:16
|
LanguageLoaderExample.zip (4,019 bytes) |
|
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. |
Date Modified | Username | Field | Change |
---|---|---|---|
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 |