I need support for replacing STR resources against XLIFF.

With a converter I can convert the STR# resources file to XLIFF.
But how do I write the needed elements back to the XLIFF file after a change?
Here I am missing some code to lern and copy.

My current v16 code to write the values to the rsr file:
<code 4D>
HLP_Ressource (“open”) //method to open my resource file
For ($i;1;Size of array(at_strinvisible))
_o_SET TEXT RESOURCE(vstr_TEXTID;at_strvisible{$i};vh_resosurce)
_o_SET RESOURCE NAME(“TEXT”;vstr_TEXTID;String($MasterPos)+"-"+at_strIndex{$i};vh_resosurce)
End for
_o_ARRAY TO STRING LIST(at_strinvisible;$MasterPos;vh_resosurce)
_o_SET RESOURCE NAME(“STR#”;$MasterPos;vt_StrName;vh_resosurce)
HLP_Ressource (“close”) //method to close my resource file
</code 4D>

My resource file use STR# and TEXT
[]29160752;“Your comment here…”[/]

Inside STR# I have now 59 categories:
[]29160760;“Your comment here…”[/]

each of this categories has up to 100 entries:
[]29160780;“Your comment here…”[/]

And the corresponding TEXT resource holds the text descriptions.
[]29160802;“Your comment here…”[/]

there are more than 1000 records.

We use this for an online help system which draws a red circle anround the form area and shows the help description. This help system was inspired by the old classic Mac OS 8.x help system.

But this doesn’t work anymore with 4D 64 Bit.

To get the values out of an XLIFF file is not the problem, the problem is to write the values inside the XLIFF to use it like before.

This code reads the values from the rsr file:
<code 4D>
HLP_Ressource (“open”)
STRING LIST TO ARRAY(vl_StrMaster;at_strinvisible;vh_resosurce)

	ARRAY TEXT(at_strvisible;Size of array(at_strinvisible))
	ARRAY TEXT(at_strIndex;Size of array(at_strinvisible))
	ARRAY LONGINT(al_strID;Size of array(at_strinvisible))
	For ($i;1;Size of array(at_strinvisible))
		at_strvisible{$i}:=Get text resource(Num($TEXT_ID);vh_resosurce)
		$tempName:=Get resource name("TEXT";Num($TEXT_ID);vh_resosurce)
		If ($pos>0)
		End if 
	End for 
	HLP_Ressource ("close")

</code 4D>

With the Miyako “4d-utility-resources-kit” I get the STR# rources converted to XLIFF
[]29160942;“Your comment here…”[/]

The TEXT resource need to added manually by code.

It seems that XLIFF against the STR# resources needs to replace the whole XLIFF file, with STR# resources I’m able to replace only the needed category.

any help and time saver is very welcome

Thanks Armin

closed, did it with xml files without xliff.