]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/bugs/search_for_locale_data_in_the_installed_location.mdwn
po/todo: added bugreport about new page's type
[git.ikiwiki.info.git] / doc / bugs / search_for_locale_data_in_the_installed_location.mdwn
1 It seems like gettext only searches for locale information in /usr/share/locale, by default. I installed ikiwiki into /usr/local, therefore the locale information wasn't found. This patch fixes the issue:
3     --- a/IkiWiki.pm
4     +++ b/IkiWiki.pm
5     @@ -1057,6 +1057,7 @@ sub gettext {
6                                     $gettext_obj=undef;
7                                     return shift;
8                             }
9     +                       $gettext_obj->dir("$installdir/share/locale/");
10                     }
11                     return $gettext_obj->get(shift);
12             }
14 [[!tag patch]]
15 -- [[ThomasBleher]]
17 > According to my testing, this patch makes ikiwiki's localisation fail for
18 > `LANG=fr_FR` when everything is installed to the default locations, 
19 > though `LANG=es_ES` works. I don't understand this behavior, especially
20 > since strace shows it successfully opening the file
21 > `/usr/share/locale/fr/LC_MESSAGES/ikiwiki.mo`.
22
23 > (Also, it should check that $installdir is set before using it.)
24
25 > --[[Joey]]