AL icon indicating copy to clipboard operation
AL copied to clipboard

Syntax for XLIFF files - TextConst, Pages, Page Fields

Open StHillmann opened this issue 9 years ago • 3 comments

Is it possible for you to give us some hints regarding the new syntax for the XLIFF files? The documentation "working with translation files" (https://docs.microsoft.com/en-us/dynamics-nav/developer/devenv-work-with-translation-files) is not such a great help for me... While Table fields will be automatically inserted into the source file, TextConst, Tooltips, Page fields and page captions are missing in my case!?!

Kind regards Stefan

StHillmann avatar Nov 22 '17 09:11 StHillmann

Hi Stefan, we also struggled with the conversion to xliff and had to change a lot in our app. I think you have to change Textconstants to the Label keyword: Txt001 : Label 'This is the text to identify the TextConstant in the xliff file.'; For Tooltips and Captions you have to use the Keywords Tooltip = 'My Tooltiptext in XLIFF'; and Caption = 'My Captiontext in XLIFF';

After this changes the missing Elements should be added to the xliff-file after the Building process.

Hope this helps

DominikWidmann avatar Nov 22 '17 09:11 DominikWidmann

@DominikWidmann is correct. You need to change the syntax to the new one. We didn't want to make a breaking change yet. We still allow the ML syntax but we are asking you to transition to the new one.

As you can see in the docs article you linked, there it says we are deprecating the ML syntax. All the labels and properties which have been converted to the new syntax will be available for translation in the Xliff files. The text consts and properties in ML syntax will not be.

If you already had only 1 language in your code you can convert to the new syntax with a simple find-and-replace regex

doivosevic avatar Nov 22 '17 10:11 doivosevic

Ok there were now a few faster than I ^^.

As an example I have a page with generated templates XLIFF, an English translation XLIFF and a German translation XLIFF.

example.zip

Note: These are more translations in there than for this one page;)

Gallimathias avatar Nov 22 '17 10:11 Gallimathias