Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Translation xliff

(0) ShareShare
ReportReport
Posted on by 216

Hi

I've done a xlf translation file, but it seems not to be used by BC

My app.json :

  "features": [ "TranslationFile" ],
  "supportedLocales": [ "fr-FR""en-US"]  

My Translations/xxxx.en-US.xlf file  :

<?xml version="1.0" encoding="utf-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="">www.w3.org/.../XMLSchema-instance" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
  <file datatype="xml" source-language="en-US" target-language="en-US" original="NAViNegoce">
    <body>
      <group id="body">
      <trans-unit xml:space="preserve" approved="yes" id="Table 817603025 - Field 726792090 - Property 2879900210"><source>...</source>
        <target state="translated">...</target>
        <note from="developer">…….</note>
      </trans-unit>

No warning, no error when i compile

But in the report, caption remains in original language (except for standard fields, which are translated - so the CurrReport.Language is good)

Version : BC 14

  • David Tailor Profile Picture
    804 on at
    RE: Translation xliff

    Hi Gwenael,

    i have a solution to translate BC interface to any language including reports!

    BR,

    Regards

  • Community Member Profile Picture
    on at
    RE: Translation xliff

    Should work then. Try searching if it's a problem with that specific version. Maybe there is a workaround for BC14?

    Best of luck!

  • Gwenael Riotteau Profile Picture
    216 on at
    RE: Translation xliff

    yes

    for the test : i delete the ['g' ,fr/fr, en-US] files, F5 to have a new 'g', , copy/paste the 'g' to the en-US / fr-FR, and add the target manually in the file

    And … it don't work

  • Community Member Profile Picture
    on at
    RE: Translation xliff

    And you definitely are using the references from the generated NAViNegoce.g.xlf file from your latest published version? Checking, because these references change erratically when anything is changed in relevant objects.

  • Gwenael Riotteau Profile Picture
    216 on at
    RE: Translation xliff

    "The above solution should solve this and display LocationCaptionLbl in English as 'Location'."

    => It should, but it don't ...

    I am with BC14, it seems that in BC15 my file is used

  • Community Member Profile Picture
    on at
    RE: Translation xliff

    If the base label for LocationCaptionLbl is in French, and there is no g.en-US xlf file, then ENU language in the client will display those French names. The above solution should solve this and display LocationCaptionLbl in English as 'Location'.

    For fr-FR to work, you would need a g.fr-FR xlf file, which basically just does 1 to 1 as so:

    source-language="en-US" target-language="fr-FR"

    <source>Dépôt</source>

    <target>Dépôt</target>

    It would be a lot less confusing if the actual caption/controls/field etc were written in English, then you would only need to maintain one translation file per language on top of ENU.

  • Gwenael Riotteau Profile Picture
    216 on at
    RE: Translation xliff

    i have done all you said

    In my 'Translations/xxx.g.xlf' file :

    <?xml version="1.0" encoding="utf-8"?>

    <xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="www.w3.org/.../XMLSchema-instance" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">

     <file datatype="xml" source-language="en-US" target-language="en-US" original="NAViNegoce">

       <body>

         <group id="body">

           <trans-unit id="Report 3761295861 - NamedType 3035507035" size-unit="char" translate="yes" xml:space="preserve">

             <source>Dépôt</source>

             <note from="Developer" annotates="general" priority="2"></note>

             <note from="Xliff Generator" annotates="general" priority="3">Report Packing List - NamedType LocationCaptionLbl</note>

           </trans-unit>

         </group>

       </body>

     </file>

    </xliff>

    in my y 'Translations/xxx.g.en-US' file (or xxx.EN-US, or xxx.fr-FR, or xxx.g.fr-fr, i have tested all) :

    <?xml version="1.0" encoding="utf-8"?>

    <xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="www.w3.org/.../XMLSchema-instance" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">

     <file datatype="xml" source-language="en-US" target-language="en-US" original="NAViNegoce">

       <body>

         <group id="body">

           <trans-unit id="Report 3761295861 - NamedType 3035507035" size-unit="char" translate="yes" xml:space="preserve">

             <source>Dépôt</source>

             <target>Location</target>

             <note from="Developer" annotates="general" priority="2"></note>

             <note from="Xliff Generator" annotates="general" priority="3">Report Packing List - NamedType LocationCaptionLbl</note>

           </trans-unit>

         </group>

       </body>

     </file>

    </xliff>

    I have also test with xxx.fr-FR, (source-language="en-US" target-language="fr-FR"), the file is not used also

    the word 'Dépôt' is not translated (but it's ok for all standard fields, like 'Quantity')

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at
    RE: Translation xliff

    In your translated XLIFF file (FR language), you need to have source-language = "en-US" amd target-language = "fr-FR".

    Then, in the nodes you need to have <source> and <target> nodes, where source = "CAPTION IN ENGLISH" and target = "CAPTION IN FR".

  • Community Member Profile Picture
    on at
    RE: Translation xliff

    Also, the translation xlf needs to be based off the current version of the base xlf file, which means every time there are field name, caption, positional changes etc, compiling/publishing creates a new version of this file, and you should use it to regenerate your translation xlf files. Otherwise the references will be wrong.

    Your process for translating should be like this:

    Generate base xlf.

    Create or use a list of translation terms between source and target language and some code or external translation software to regenerate target xlf.

    Copy target xlf into project.

    Repackage .app file

  • Community Member Profile Picture
    on at
    RE: Translation xliff

    app.json looks fine.

    The base generated xlf is assumed to be ENU, and named <extension name>.g.xlf

    Your translation xlf for target language should be named <extension name>.g.<language>.xlf (the .g. is important afaict)

    I'm asuming fr-FR is your target. in that case <extension name>.g.fr-FR.xlf, and in the xlf, the <file> tag should contain the attribute 'target-language="fr-FR"'

    You can also make a en-US specific translation file by using the same naming convention. This can be useful where a caption needs to be translated differently even if it's the same in English (eg sheep is both singlular and plural, but not in German). This way your external translation tool can use other placeholders than the English text (eg "sheep_plural", and print Sheep in en-US and Schafen in German).

    If you have somehow done all of the base captions, tooltips etc in French, you will need an xlf file for both fr-FR and en-US.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 1,165

#2
YUN ZHU Profile Picture

YUN ZHU 1,004 Super User 2025 Season 1

#3
Mansi Soni Profile Picture

Mansi Soni 830

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans