Register

Avoiding encoding issues with Viewlet translation files

General Tips & Tricks
Site Admin
User avatar
Posts: 51
Joined: Sat May 27, 2006 1:27 am
Location: Dolny Kubin, Slovakia

Avoiding encoding issues with Viewlet translation files

Postby Rado » Fri Jul 26, 2013 2:03 am

ViewletBuilder and ViewletQuiz allow you to export the project text for translation into an XML file. After the file has been translated, it can be imported back into the project, and a localized version of the project published side-by-side with the original version. Recently, some customers reported issues - being unable to import the translated file back.

Since most of these issues were caused by incorrect encoding of the translated XML files, we have prepared short instructions on how to make sure the translated file keeps the correct encoding. The XML format uses the UTF-8 encoding by default, as it supports multiple character sets and languages. While there are special application available for editing XML files, they can also be edited using any plain-text editor, including the Windows built-in Notepad, or the excellent freeware Notepad++ (which makes editing easier, thanks to syntax highlighting).

Some tools, such as Notepad++, will detect UTF-8 encoding automatically, but the Windows built-in Notepad will assume ANSI encoding in some cases (usually when the original file is in English or other language using the western character set). This can be a problem if the file is translated into a language that is using a different character set. To ensure that the translated file will be imported correctly, please inform your translators that if they are using Notepad, they will need to select "UTF-8" form the list of encodings in the "Save As" dialog.

notepad_encoding.png
Notepad - selecting encoding


In other text editors, the encoding is found in different locations (usually under the "File", "Document" or a dedicated "Encoding" menu).

notepadpp_encoding.png
Notepad++ - selecting encoding
notepadpp_encoding.png (9.24 KiB) Viewed 4982 times


It is also critical that the XML elements remain unmodified for ViewletBuilder to be able to import the translated file back.

Return to FAQs - ViewletBuilder 7.x

Who is online

Users browsing this forum: No registered users and 1 guest