Revision [13161]

This is an old revision of WikkaInternationalization made by GiorgosKontopoulos on 2006-02-13 05:42:50.



Two different issues were initially conflated in this page:
  1. Internationalization: translation of kernel messages/actions in different languages
  1. HandlingUTF8 Multilanguage support: how to make Wikka compatible with different charsets
Discussion on the latter has been moved to HandlingUTF8

From Wikipedia:
Internationalization and localization both are means of adapting products such as publications or software for non-native environments, especially other nations and cultures.

"Internationalization" is often abbreviated as I18N (or i18n or I18n), where the number 18 refers to the number of letters omitted (conveniently, in either spelling). "Localization" is often abbreviated L10N (etc.) in the same manner.

There have been requests for Wikka to handle language translations. Now the question is, what is the best way to achieve this?

DotMG has made a proposal below. The method proposed is common in PHP coding and should work okay. However before we move forward, it would be nice to have more feedback. Are there any pointers or suggestions for alternative methods? Searching on the web revealed pointers to using gettext, but it's not clear how portable this would be in various web servers environments.

Any other suggestions?

Regardless of what we decide, I think we should use the ISO 639-2 alpha-3 code as a standard for language abbreviations. Check the LanguageCodes page for a table with all the codes.

DotMG's proposal

To make wikka available in more languages, we have to rewrite pages (especially actionsALTER TABLE `pages` CHANGE `body` `body` MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL

	2.  changed actions/header.php on line 13 to UTF instead of ISO-8859-1
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	3.  modified wikka.php, on line 88 inserted a line
function Query($query)
$start = $this->GetMicroTime();
mysql_query("SET NAMES 'utf8'");
if (!$result = mysql_query($query, $this->dblink))

4. Opened up my SandBox and inputted some different languages and saved.
5. Editted the page again and got back the same characters I inputted and not their UTF8 encodings

Note 1: the collation of wikka_pages.tag should also be changed to utf8_bin else the search is broken

Note 2: step 1 can be done programmatically by adding "DEFAULT CHARSET=utf8" at the end of the SQL query that creates the tables right before the colon (;) like this: ")ENGINE=MyISAM DEFAULT CHARSET=utf8;" but I have not tested it yet.


  • Giorgos, take a look at WikkaLocalization: the point is that - to my knowledge - not all MySQL versions support UTF8 as encoding. We want to keep back-compatibility with users running older MySQL versions. The solution you suggest is actually similar to the one that many users have chosen for running their non-Western speaking wikis. -- DarTar
    • Perhaps we should document this modifications in the documentation. It may not be possible for everyone but helpfull for some people. --NilsLindenberg

There are 16 comments on this page. [Show comments]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki