InstantForum.NET User Guide

Creating a Language Pack


InstantForum.NET can be easily localized in different languages. All labels, tool tips, error messages, buttons (excluding image buttons), email templates and dictionaries are located in external resource files.

This allows developers to easily create additional language packs and also offers a centralized location to update existing text or email templates used within the application.

InstantForum.NET is shipped with support for US English. More language packs will be available in the near future from our web site. To view the US English Language pack and become familiar with it's contents please open the en-US language pack folder within the Globalization directory and view the various files within NotePad or similar ACSII editor. Do NOT use a WYSIWYG editor such as MS Word™ to edit the resource files within a language pack folder.

Creating a Language Pack

To begin creating a localized language pack you should duplicate the default en-US language pack folder provided as shown below...



Once you've duplicated the directory you should rename this to something more appropriate. We would suggest following the RFC 1766 standard in the format [Language code]-[County/Region code]. As in our example en-US stands for English - United States.

Once you've renamed your language pack folder we would suggest you move this outside of your Globalization directory. This will ensure the language pack will not be available whilst it's being created. To begin creating your language pack you should update the Language.XML file within your new language pack folder. The Language.XML definition file describes the language pack to InstantForum.NET.

In the example below we are creating a German language pack...



Once you've modified the Language.xml to describe the language pack you should localize all the additional resource files. Once all files have been localized simply place the updated language pack within the Globalization directory and the forum will automatically detect the new language pack. It may take the forum a couple of minutes to recognize any new language packs placed within the Globalization directory.

All language pack resource files can be edited using any standard ASCII editor such as NotePad or similar.

XML Encoding & Special Characters

Note: Many of the resource files are XML based. Because of this you will need to ensure you don't use any markup that may be interpreted as having special meaning. If you need to use any of the characters below within your XML tags you should replace it with the listed entity reference also below. There are five predefined entities (built-in) in XML that you should be aware of:

CharacterEntity reference
&& (or & )
<&lt; (or &#60; )
>&gt; (or &#62; )
"&quot; (or &#34; )
'&apos; (or &#39; )

XML documents may contain foreign characters, like Norwegian æ ø å , or French ê è é. To ensure the XML parser understands these characters, you should save your XML resource files as Unicode. In XML, the character encoding is optional and can be given in the XML declaration in the first line of the document, like this:

<?xml version="1.0" encoding="iso-8859-1"?>

For most standard character sets we would suggest utf-8. The XML processor can recognize the following character set names:

UTF-8
UTF-16
ISO-10646-UCS-2
ISO-10646-UCS-4
ISO-8859-1 to -9
ISO-8859-11
TIS-620
ISO-2022-JP
Shift-JIS
EUC-JP

Examples of encoding declarations:

<?xml version="1.0" encoding="UTF-16"?>

<?xml version="1.0" encoding="EUC-JP"?> (for Japanese character)

<?xml version="1.0" encoding="iso-8859-11"?> (for Thai character )

If no encoding is given XML defaults to UTF-8. If you try to load an XML based resource file into Internet Explorer, you may one of the following error messages indicating encoding problems:

An invalid character was found in text content.

You will get this error message if a character in the XML document does not match the encoding attribute. Normally you will get this error message if your XML document contains "foreign" characters, and the file was saved with a single-byte encoding editor like Notepad, and no encoding attribute was specified.

Switch from current encoding to specified encoding not supported.

You will get this error message if your file was saved as Unicode/UTF-16 but the encoding attribute specified a single-byte encoding like Windows-1252, ISO-8859-1 or UTF-8. You can also get this error message if your document was saved with single-byte encoding, but the encoding attribute specified a double-byte encoding like UTF-16.