I need to get all caption values of the fields in various tables. Is there any way to code this?
I know I can do it by setting the language and then running a report/dataport exporting fieldcaption. But I was wondering if it might be possible to export all languages in one go.
Something like
FieldRec.SETRANGE(TableNo, 36);
RecordRef.OPEN(36);
FieldRec.FINDSET;
repeat
FieldRef := RecordRef.FIELD(FieldRec."No.")
//Start language loop
Export FieldRef.CAPTION;
//End language loop
until FieldRec.NEXT = 0;
Or if I can read the CaptionML directly somewhere, that would be equally helpful.
Tools-> Translate -> Export will also almost do what I need. But then I need to make some code to run through the file stripping the extra identification values for each line.
Answers
doesn't seem to work - only export as .txt or xml would contain all the CaptionML strings.
with best regards
Jens
read the table field caption that you need then use send keys to change the language under Tools -> Language.
From help on globallanguage function.
(See code, F5, system, language)
GLOBALLANGUAGE (Language)
Use this function to set and retrieve the current C/SIDE global language setting.
so filter your language table to the supported languages in your system, loop over them, and use the globallanguage function to change the language just before you export the caption.
|To-Increase|