Revision history for WikkaGettext
Revision [23165]
Last edited on 2016-05-20 07:38:47 by DotMG [Replaces old-style internal links with new pipe-split links.]Additions:
In order to improve the I18N of Wikka, it could be a good idea to add support for different interface translations. The best way to handle this kind of translations is using [[http://www.gnu.org/software/gettext/ | gettext]] which is a mature, widely used (wordpress, phpwiki) localization framework. It is pretty much the defacto standard in the open source/free software realm.
**[[http://ettin.org/vault/wikka/wikka-1.1.5.3-gettext.tar.gz | wikka-1.1.5.3-gettext.tar.gz]]** (140k) Updated on October 6, 2004
$here = $this->Format('[[PasswordForgotten | '._("here").']]');
**[[http://ettin.org/vault/wikka/wikka-1.1.5.3-gettext.tar.gz | wikka-1.1.5.3-gettext.tar.gz]]** (140k) Updated on October 6, 2004
$here = $this->Format('[[PasswordForgotten | '._("here").']]');
Deletions:
**[[http://ettin.org/vault/wikka/wikka-1.1.5.3-gettext.tar.gz wikka-1.1.5.3-gettext.tar.gz]]** (140k) Updated on October 6, 2004
$here = $this->Format('[[PasswordForgotten '._("here").']]');
No Differences
Revision [16163]
Edited on 2007-02-20 00:28:14 by DotMG [Presenting PHP-Gettext, for those who don't have gettext support.]Additions:
==Php Gettext, a class that can read directly mo files==
At http://savannah.nongnu.org/projects/php-gettext/ , you can find a class consisting of 2 files that can read mo files even if you don't have gettext support installed. It doesn't require anything other than PHP, and its size is absolutely small. I (-- DotMG --) was not a fan of Gettext until I found this class. It is GPL-licensed.
At http://savannah.nongnu.org/projects/php-gettext/ , you can find a class consisting of 2 files that can read mo files even if you don't have gettext support installed. It doesn't require anything other than PHP, and its size is absolutely small. I (-- DotMG --) was not a fan of Gettext until I found this class. It is GPL-licensed.
Additions:
In order to improve the I18N of Wikka, it could be a good idea to add support for different interface translations. The best way to handle this kind of translations is using [[http://www.gnu.org/software/gettext/ gettext]] which is a mature, widely used (wordpress, phpwiki) localization framework. It is pretty much the defacto standard in the open source/free software realm.
==Download==
You can download the testing package with gettext support, some directories have been removed in order to reduce the file size.
It should be installed like the normal Wikka, the only additional option in the setup process is the language selection. There are 2 languages available right now: Catalan and English. You can try to install it in catalan to see that the final result is a Wikka site, but in catalan (there are some missing strings).
**[[http://ettin.org/vault/wikka/wikka-1.1.5.3-gettext.tar.gz wikka-1.1.5.3-gettext.tar.gz]]** (140k) Updated on October 6, 2004
==Tasks==
1) gettext support -- done
1) different domains (wikka and wikka-setup) -- done
1) locale selection from the installer -- done
1) script to update po files -- done
1) make strings translatable -- 142 strings **so far**
~- wikka.pot: 101 strings
~- wikka-setup.pot: 41 strings
==Known problems==
**Hardcoded ""WikiPages""**
%%
actions/textsearch.php:22 TextSearchExpand
actions/footer.php:3 TextSearch
actions/usersettings.php:118 MyPages
actions/usersettings.php:119 MyChanges
actions/category.php:8 Category Category
%%
If we want to let users choose their preferred language from usersettings, we can't translate hardcoded ""WikiPages"". These are always the same, since they are on the database and were translated in the setup process. Possible solutions:
~- Do not translate page tags.
~- Add these hardcoded pages to the config file with their respective name, so that we can use $config["""MyPages"""] instead of ""MyPages"".
==FAQ==
**How to make strings translatable with gettext?**
It is simple, just use the ##_()## or ##gettext()## function.
Example (simple):
%%(php)
<?php
print(_("Hello Wikka!"));
?>
%%
Example (formatted):
%%(php)
<?php
$here = $this->Format('[[PasswordForgotten '._("here").']]');
printf(_("If you need a temporary password, click %s."), $here);
?>
%%
**What do we gain with gettext?**
~- automatic detection of outdated translation strings
~- standard framework so that existing translation teams can work on wikka at no cost
==Categories==
CategoryDevelopmentI18n
==Download==
You can download the testing package with gettext support, some directories have been removed in order to reduce the file size.
It should be installed like the normal Wikka, the only additional option in the setup process is the language selection. There are 2 languages available right now: Catalan and English. You can try to install it in catalan to see that the final result is a Wikka site, but in catalan (there are some missing strings).
**[[http://ettin.org/vault/wikka/wikka-1.1.5.3-gettext.tar.gz wikka-1.1.5.3-gettext.tar.gz]]** (140k) Updated on October 6, 2004
==Tasks==
1) gettext support -- done
1) different domains (wikka and wikka-setup) -- done
1) locale selection from the installer -- done
1) script to update po files -- done
1) make strings translatable -- 142 strings **so far**
~- wikka.pot: 101 strings
~- wikka-setup.pot: 41 strings
==Known problems==
**Hardcoded ""WikiPages""**
%%
actions/textsearch.php:22 TextSearchExpand
actions/footer.php:3 TextSearch
actions/usersettings.php:118 MyPages
actions/usersettings.php:119 MyChanges
actions/category.php:8 Category Category
%%
If we want to let users choose their preferred language from usersettings, we can't translate hardcoded ""WikiPages"". These are always the same, since they are on the database and were translated in the setup process. Possible solutions:
~- Do not translate page tags.
~- Add these hardcoded pages to the config file with their respective name, so that we can use $config["""MyPages"""] instead of ""MyPages"".
==FAQ==
**How to make strings translatable with gettext?**
It is simple, just use the ##_()## or ##gettext()## function.
Example (simple):
%%(php)
<?php
print(_("Hello Wikka!"));
?>
%%
Example (formatted):
%%(php)
<?php
$here = $this->Format('[[PasswordForgotten '._("here").']]');
printf(_("If you need a temporary password, click %s."), $here);
?>
%%
**What do we gain with gettext?**
~- automatic detection of outdated translation strings
~- standard framework so that existing translation teams can work on wikka at no cost
==Categories==
CategoryDevelopmentI18n
Deletions:
==Download==
You can download the testing package with gettext support, some directories have been removed in order to reduce the file size.
It should be installed like the normal Wikka, the only additional option in the setup process is the language selection. There are 2 languages available right now: Catalan and English. You can try to install it in catalan to see that the final result is a Wikka site, but in catalan (there are some missing strings).
**[[http://ettin.org/vault/wikka/wikka-1.1.5.3-gettext.tar.gz wikka-1.1.5.3-gettext.tar.gz]]** (140k) Updated on October 6, 2004
==Tasks==
1) gettext support -- done
1) different domains (wikka and wikka-setup) -- done
1) locale selection from the installer -- done
1) script to update po files -- done
1) make strings translatable -- 142 strings **so far**
~- wikka.pot: 101 strings
~- wikka-setup.pot: 41 strings
==Known problems==
**Hardcoded ""WikiPages""**
%%
actions/textsearch.php:22 TextSearchExpand
actions/footer.php:3 TextSearch
actions/usersettings.php:118 MyPages
actions/usersettings.php:119 MyChanges
actions/category.php:8 Category Category
%%
If we want to let users choose their preferred language from usersettings, we can't translate hardcoded ""WikiPages"". These are always the same, since they are on the database and were translated in the setup process. Possible solutions:
~- Do not translate page tags.
~- Add these hardcoded pages to the config file with their respective name, so that we can use $config["""MyPages"""] instead of ""MyPages"".
==FAQ==
**How to make strings translatable with gettext?**
It is simple, just use the ##_()## or ##gettext()## function.
Example (simple):
%%(php)
<?php
print(_("Hello Wikka!"));
?>
%%
Example (formatted):
%%(php)
<?php
$here = $this->Format('[[PasswordForgotten '._("here").']]');
printf(_("If you need a temporary password, click %s."), $here);
?>
%%
**What do we gain with gettext?**
~- automatic detection of outdated translation strings
~- standard framework so that existing translation teams can work on wikka at no cost
==Categories==
CategoryDevelopment
Additions:
In order to improve the I18N of Wikka, it could be a good idea to add support for different interface translations. The best way to handle this kind of translations is using [[http://www.gnu.org/software/gettext/ gettext]] which is a mature, widely used (wordpress, phpwiki) localization framework. It is pretty much the defacto standard in the open source/free software realm.
Additions:
**[[http://ettin.org/vault/wikka/wikka-1.1.5.3-gettext.tar.gz wikka-1.1.5.3-gettext.tar.gz]]** (140k) Updated on October 6, 2004
Deletions:
Deletions:
**Available translations**
- Catalan (128/142)
- Spanish (2/142)
Additions:
actions/category.php:8 Category Category
Deletions:
Additions:
actions/category.php:8 ""CategoryCategory""
Deletions:
Additions:
**[[http://ettin.org/projects/wikka/wikka-1.1.5.3-gettext_2.tar.gz wikka-1.1.5.3-gettext_2.tar.gz]]** (140k) Updated on October 6, 2004
actions/footer.php:3 TextSearch
actions/footer.php:3 TextSearch
Deletions:
actions/footer.php:3 TextSearchExpand
Revision [1687]
Edited on 2004-10-06 16:00:21 by JordaPolo [Updated status. Added known problems. Updated FAQ.]Additions:
==Tasks==
1) make strings translatable -- 142 strings **so far**
~- wikka.pot: 101 strings
- Catalan (128/142)
- Spanish (2/142)
==Known problems==
**Hardcoded ""WikiPages""**
actions/textsearch.php:22 TextSearchExpand
actions/footer.php:3 TextSearchExpand
actions/usersettings.php:118 MyPages
actions/usersettings.php:119 MyChanges
actions/category.php:8 CategoryCategory
If we want to let users choose their preferred language from usersettings, we can't translate hardcoded ""WikiPages"". These are always the same, since they are on the database and were translated in the setup process. Possible solutions:
~- Do not translate page tags.
~- Add these hardcoded pages to the config file with their respective name, so that we can use $config["""MyPages"""] instead of ""MyPages"".
**What do we gain with gettext?**
~- automatic detection of outdated translation strings
~- standard framework so that existing translation teams can work on wikka at no cost
==Categories==
1) make strings translatable -- 142 strings **so far**
~- wikka.pot: 101 strings
- Catalan (128/142)
- Spanish (2/142)
==Known problems==
**Hardcoded ""WikiPages""**
actions/textsearch.php:22 TextSearchExpand
actions/footer.php:3 TextSearchExpand
actions/usersettings.php:118 MyPages
actions/usersettings.php:119 MyChanges
actions/category.php:8 CategoryCategory
If we want to let users choose their preferred language from usersettings, we can't translate hardcoded ""WikiPages"". These are always the same, since they are on the database and were translated in the setup process. Possible solutions:
~- Do not translate page tags.
~- Add these hardcoded pages to the config file with their respective name, so that we can use $config["""MyPages"""] instead of ""MyPages"".
**What do we gain with gettext?**
~- automatic detection of outdated translation strings
~- standard framework so that existing translation teams can work on wikka at no cost
==Categories==
Deletions:
1) make strings translatable -- 123 strings **so far**
~- wikka.pot: 82 strings
- Catalan (122/123)
- Spanish (2/123)
Additions:
- Catalan (122/123)
Deletions:
Additions:
**[[http://ettin.org/projects/wikka/wikka-1.1.5.3-gettext.tar.gz wikka-1.1.5.3-gettext.tar.gz]]** (135k)
Deletions:
- **[[http://ettin.org/projects/wikka/wikka-1.1.5.3-gettext.tar.gz wikka-1.1.5.3-gettext.tar.gz]]** (135k)
Additions:
1) make strings translatable -- 123 strings **so far**
==Download==
You can download the testing package with gettext support, some directories have been removed in order to reduce the file size.
It should be installed like the normal Wikka, the only additional option in the setup process is the language selection. There are 2 languages available right now: Catalan and English. You can try to install it in catalan to see that the final result is a Wikka site, but in catalan (there are some missing strings).
- **[[http://ettin.org/projects/wikka/wikka-1.1.5.3-gettext.tar.gz wikka-1.1.5.3-gettext.tar.gz]]** (135k)
- Catalan (119/123)
==Download==
You can download the testing package with gettext support, some directories have been removed in order to reduce the file size.
It should be installed like the normal Wikka, the only additional option in the setup process is the language selection. There are 2 languages available right now: Catalan and English. You can try to install it in catalan to see that the final result is a Wikka site, but in catalan (there are some missing strings).
- **[[http://ettin.org/projects/wikka/wikka-1.1.5.3-gettext.tar.gz wikka-1.1.5.3-gettext.tar.gz]]** (135k)
- Catalan (119/123)
Deletions:
- Catalan (120/123)
Additions:
- Catalan (120/123)
Deletions:
Additions:
1) make strings translatable -- 123 strings so far
~- wikka.pot: 82 strings
~- wikka-setup.pot: 41 strings
- Catalan (102/123)
- Spanish (2/123)
~- wikka.pot: 82 strings
~- wikka-setup.pot: 41 strings
- Catalan (102/123)
- Spanish (2/123)
Deletions:
- Catalan (83/115)
- Spanish (2/115)
Additions:
CategoryDevelopment
Deletions:
Additions:
1) make strings translatable -- 115 strings so far
- Catalan (83/115)
- Spanish (2/115)
- Catalan (83/115)
- Spanish (2/115)
Deletions:
- Catalan (83/85)
- Spanish (2/85)
Additions:
The gettext support only requires some minor code changes (3 lines of code).
==Jobs==
1) gettext support -- done
1) different domains (wikka and wikka-setup) -- done
1) locale selection from the installer -- done
1) script to update po files -- done
1) make strings translatable -- 85 strings so far
- Catalan (83/85)
- Spanish (2/85)
==Jobs==
1) gettext support -- done
1) different domains (wikka and wikka-setup) -- done
1) locale selection from the installer -- done
1) script to update po files -- done
1) make strings translatable -- 85 strings so far
- Catalan (83/85)
- Spanish (2/85)
Deletions:
The gettext support only requires some minor changes (3 lines of code).
The second stage includes locale selection from the installer, and fully translatable default wikka pages (such as HomePage, FormattingRules, PageIndex...).
83 strings have been made translatable so far.
- Catalan (83/83)
- Spanish (2/83)
Additions:
The second stage includes locale selection from the installer, and fully translatable default wikka pages (such as HomePage, FormattingRules, PageIndex...).
Deletions:
Additions:
The first stage of the gettext support for Wikka 1.1.5.3 is almost finished.
The gettext support only requires some minor changes (3 lines of code).
The gettext support only requires some minor changes (3 lines of code).
Deletions:
Deletions:
Additions:
==WikkaGettext==
The first stage of the gettext support for Wikka 1.1.5.3 is almost finished. The gettext support only requires some minor changes (3 lines of code).
The second stage includes locale selection from the installer, and default pages 100% translatable (including WikiNames).
==Status==
==FAQ==
The first stage of the gettext support for Wikka 1.1.5.3 is almost finished. The gettext support only requires some minor changes (3 lines of code).
The second stage includes locale selection from the installer, and default pages 100% translatable (including WikiNames).
==Status==
==FAQ==
Deletions:
Additions:
**Available translations**
- Catalan (83/83)
- Spanish (2/83)
**How to make strings translatable with gettext?**
- Catalan (83/83)
- Spanish (2/83)
**How to make strings translatable with gettext?**
Deletions:
Additions:
The first stage of the gettext support for Wikka 1.1.5.3 is almost finished, and only requires some minor changes (3 lines of code).
83 strings have been made translatable so far.
83 strings have been made translatable so far.
Additions:
Example (simple):
%%(php)
Example (formatted):
%%(php)
$here = $this->Format('[[PasswordForgotten '._("here").']]');
printf(_("If you need a temporary password, click %s."), $here);
%%(php)
Example (formatted):
%%(php)
$here = $this->Format('[[PasswordForgotten '._("here").']]');
printf(_("If you need a temporary password, click %s."), $here);