French characters in translation via extension
I created a translation of the standard objects like described here
The problem is that the source language (french) uses characters that seem not to be suitable in ANSI? In Windows Client all french characters are "question marks". When I change the character set of the text file to UTF-8 or unicode, AL compiler no longer accepts the file:
file at location '...fr-FR_1.txt' does not match any definition.
In ANSI the AL Compiler states: file at location '...fr-FR_1.txt' matches the definition for 'TranslationFile'.
Example: T36-F8-P8629-A1036-L999:Adresse (2Šme ligne)

I tried the second way described in the link:
Place the translated files on the server, or on each service instance in a /Translations folder. For more information, see this guidance.
and removed the file from the extension and republished. The result stays the same... "Mojibaake" in the client.
Hello Marcus,
I already have this type of issue. I'm french :)
the best wait to manage this is the following :
- extract translation file (file 1)
- copy translation file (file 2)
- do your translation (file 2)
- copy/paste translation from file 2 to file 1
you have an issue because when you modify directly extracted file and save it your change the character set of the file from UTF8 to ANSI.
Hello Marcus,
I already have this type of issue. I'm french :)
the best wait to manage this is the following :
1. extract translation file (file 1) 2. copy translation file (file 2) 3. do your translation (file 2) 4. copy/paste translation from file 2 to file 1you have an issue because when you modify directly extracted file and save it your change the character set of the file from UTF8 to ANSI.
Salut Christophe,
I do not really understand what you mean. VS Code / the AL compiler only accepts language files (the .txt files as I want to translate the standard objects) that are encoded in ANSI
Best regards Markus
The translation files which you get from C/SIDE are not in ANSI (=code page 1252) but rather in code page 850 (sometimes misnomed as ASCII).
The *.xlfs (XLIFF) and AL itself use UTF-8. If you have existing C/AL objects and use a recent txt2AL converter it will generate XLIFFs in UTF-8, one for each language found in the C/AL translation files.
For other sources, I have written several scripts to convert code pages in text files. You can adapt these for all existing ones, here the available OEM850->UTF-8 is suitable. http://www.msdynamics.de/viewtopic.php?f=17&t=25726&p=107219 With GUI http://www.msdynamics.de/viewtopic.php?f=17&t=25726&p=107219&#p129455
Hi Kai,
thanks for your reply. But my problem is different. :-)
- "Standard Objects can not be translated via xliff" files. These must be translated via the .txt files from the dev environment via Tools -> Translate
- The translated file (this can be automatically translated via Microsoft Dynamics Lifecycle Services) needs to be placed in the main folder of the extension and is then recognized as translation file by the AL Compiler and then added to the extension
My Problem is that the AL compiler ony accepts translation files (.txt files) that are encoded in ANSI. All others are stated as "do not match any definition..."
The files you receive via Lifecycle Service are always encoded in ANSI and the xliffs that come via txt2AL can not be used because they only work for your extensions in AL not for texts coming with standard NAV objects.
Regards Markus
If I understand you correctly, you are trying to do this step here: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-work-with-translation-files#translation-and-localization-apps Have you tried converting the ANSI file from the translation service to code page 850? As mentioned, OEM850 is what comes out of NAV, ever since the days of DOS and the 'blue version'. I've written a script for that direction as well, see above link ( ANSI1252 -> OEM850). A right or wrong code page in a text file can never be detected by a program (only by visual examination), but all currrent systems of course use ANSI for non-Unicode files, the Unicode files can be detected by the BOM (Byte Order Mark) in the file header. But the file format legacy of NAV started 30 years ago, when OEM850 was normal.
Please let us know if you still encounter the problem that AL compiler doesn't recognize the file even when using code page 850
If I understand you correctly, you are trying to do this step here: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-work-with-translation-files#translation-and-localization-apps Have you tried converting the ANSI file from the translation service to code page 850? As mentioned, OEM850 is what comes out of NAV, ever since the days of DOS and the 'blue version'. I've written a script for that direction as well, see above link ( ANSI1252 -> OEM850). A right or wrong code page in a text file can never be detected by a programme (only by visual examination), but all currrent systems of course use ANSI for non-Unicode files, the Unicode files can be detected by the BOM (Byte Order Mark) in the file header. But the file format legacy of NAV started 30 years ago, when OEM850 was normal.
Hi Kai, danke für die aufschlussreiche Erklärung! Thanks for the very informative description. Funny that even 2018 creates the files from blue time, so everything stays blue! :-)
I tried your script, it worked, but seems the translation service creates some sort of different code page as 1252, the file is recognized but the text now looks even worse.
The é for example lost its "e". ;-)
Can I somehow find out which codepage is used by translation service? @StanislawStempin perhaps you have good connections and can ask your colleagues? That would be very nice. :-) The windows editor states it as "ANSI" and it seems to be not 1252.
Thanks for your help so far. Markus
It might indeed be something different, ANSI stands for lots of code pages, 1252 applies to Western Languages only. Could you upload some lines of the file you received from the translation service with special characters? Then I can try to convert these. Missing diacritical marks are usually caused by Unicode conversions which lack normalization.
To check the conversion before the compiler processes it, you can switch Notepad++ to display code page 850 correctly like this: http://www.msdynamics.de/download/file.php?id=5296
It might indeed be something different, ANSI stands for lots of code pages, 1252 applies to Western Languages only. Could you upload some lines of the file you received from the translation service with special characters? Then I can try to convert these. Missing diacritical marks are usually caused by Unicode conversions which lack normalization.
To check the conversion before the compiler processes it, you can switch Notepad++ to display code page 850 correctly like this: http://www.msdynamics.de/download/file.php?id=5296
Hi Kai, the funny thing is: if I open the original file from translation service in Notepad++ it and switch to Code 850 the strings are displayed correctly. The source is displayed to be encoded in "ANSI". :-)
Attached you find a sample of the file.
Thanks for your help Markus
Yes, the sample file is already in code page 850, pure and simple. So if that turns out wrong in the extension the AL compiler presumably now expects code page 1252 or maybe ISO 8859-1. I've got scripts for both conversions (added one for OEM850->ISO 8859-1 just now), same link above.
Please let us know if you still encounter the problem that AL compiler doesn't recognize the file even when using code page 850
Hi Stanislaw,
can you perhaps tell us which codepage the AL compiler is expecting for correctly displaying "funny characters"? :-)
Thanks very much Markus
Hi All,
The translation file should be encoded in UTF-8 to support the special characters. For the on-prem versions, make sure to use the correct collation in your DB, so sorting and search for example in the customers' name with special charecters also works fine.
Regards Pooya
Hi PooyaKharamesh, sorry, but please see the original request! ;-) Files encoded in UTF-8 are not accepted by the AL compiler! Translation of "native" = original NAV objects can only be translated via .txt files, not .xlfs Please re-open this as I still do not have a clue how to do this! Thanks Markus
Thank you Markus,
I could successfully use both txt and xlfs files to translate strings contain special chars. It works both on win and web client.
would you please send us the code that you have or your sample code in a zip file?

Regards Pooya
Hi Pooya, on your Screenshot you see exacly the wrong characters. :-)
2..me ligne should be 2ème Ligne
Attached you find the txt file I received from MS Translation Service and the one coded with OEM850
Both do not show the correct "funny characters" in NAV. ;-)
The same with the äöü in the "german text" sample.
Best regards Markus
Hi Marcus,
Those are exactly the chars that I put in the file and are shown as expected.
I also converted your translation files encoding and I can see that all the special chars are shown correctly. The same result for the German special chars, äöü.
Please notice that the fr-FR.txt does not have the correct encoding and needs to be converted -using an external tool (e.g VS code , Notepad ++ , ...)- to UTF-8. In vs code, you can use the Command Palette (Ctrl+Shift +P) and search for "Change File Encoding". Try to reopen the file with encoding and choose OEM-850, then change the encoding, using the same command and this time save with encoding, make sure to choose UTF-8.

/Pooya
Hello everyone, We are working on an Eastern European translation for BC (ro-RO).
We tried to use the file we got from Microsoft Dynamics Lifecycle Services, but for our language is translated word by word and most of the translations are not correct or don't have the correct meaning.
We imported our old translations from NAV 2018 to BC and i exported the .txt file, which has of course ANSI encoding. I tried to covert the file to UTF-8 (with VS code and also notepad++), but i don't get the correct diacritics. We have ăîâţş. And for example for ă we have Ç (in UTF-8).
How can we correct this?
Thanks a lot. Raluca
If you export from C/SIDE with the regional OS settings in Romania, the code page for Central Eastern Europe should be 852. I've got conversion scripts for that too here: http://www.msdynamics.de/viewtopic.php?f=17&t=25726
Look for: Convert_OEM852_UTF8_Dlg

Hello, Thank you very much. It didn't work for us :( but it was a starting point and we resolved this.
What did you do about the resources? I didn't find the Partner Translation Toolkit for BC. How did you translate them?
Raluca