Typo3 locallang.xml and UTF-8

Building a multi language site can be very hard. First of all you need be sure that you are running Typo3 and your database with the correct encoding. UTF-8 is your friend! Apply all the setting you need for you installation (have a look at http://wiki.typo3.org/index.php/UTF-8_support will may help you) and also ensure your database is using UTF-8. (BTW: If you database tables are using UFT-8 you do NOT need to set $TYPO3_CONF_VARS[‚SYS‘][‚multiplyDBfieldSize‘] and do not forget to run database->compare of the installation tool)

Now your Typo3 installation is working fine. Really? Have you checked your own extensions? Ups! There is may a problem if you use getLL and locallang.xml. Some chars are may mess up even if the locallang.xml looks fine (of course you are using an UTF-8 enabled editor and you are saving this file as UTF-8).

The problem is the „default“ languageKey setting. You are not allowed to use any encoding then ansi. But what if you need some special chars there? Be sure you set an other default key (for example „config.language = en“ will do this job for english) and rename „default“ to „en“. Now you are fine!

One thought on “Typo3 locallang.xml and UTF-8”

  1. Pingback: BStar's Code Snippets

Comments are closed.