Retrieve actual tags(ph, bpt, ept) information from the placeholders using API.

Hi Everyone,

I would like to retrieve actual tags(ph, bpt, ept) from the placeholders.
The only information I have is WScontext object. I got to the point where I could retrieve AssetManager information using WScontext object.

Iterator textSegmentsIterator = context.getAssetManager().getAsset("AIS path").textSegmentIterator();
However, I don't know how to get the AIS path.

Is there any API to get actual tags from the placeholders using WScontext object?


Thanks in advance.

Parents Reply

    I did a test and have created some code samples as above. I think this can be your answer.

    This sample contains sample Java code files for two components (with one desc.xml):

    • My Test MT: An dummy MT component, which is just to catch the target text with specific suffix and prefix. 
    • My Test AA: An automatic action to apply that My Test MT. Along with that process, it adds a comment to a segment if any italic tag is in the tags. 

    So if you build it and create a ZIP file to install, the sample can show:

    • Adding both an automatic action and an MT component by uploading a single installer ZIP into WorldServer.
    • The automatic action which applies this "My Test MT"MT automatically. 
      • And since it adds a comment if a tag is for italic, this means you can get the actual tag information along with the actual MT process.
    • Since a class implementing the WSMTService class has been used in the AA, that might be a good sample of how to use such a class.

    This is a sample workflow I used for this test.

    And the results on BWB.

    Please feel free to reply for any further question if any.