It seems correct comment, so I have added lv_LV locale to pfLocales.js script. 

Unfortunately, I still can’t see lv_LV locale in the list, so it doesn’t change 

I also tried to delete pt_BR from this list in script, and it is not removing 
entry from profile configuration. I suspect that data are compiled and cached 
somewhere, and I need to update that cache to see any changes. 


I have looked if locales are present in other PF files, but haven’t found 
nothing editable. There are locales used in many scripts, mainly to service 
different kind of exceptions, but nothing which seems related to locale list…

I see that there are some users, which  successfully  added own language 
translation, so it is possible.

At least users who succeeded and also PF maintainer, who adds new languages 
definitely know how he does it.  I am probably missing some step:


*         May be I need change some setting in some file

*         May be I need to run some script  which deletes cached values and 
reads from configuration files new configuration

*         May be I need to use some magic (unfortunately, that seems impossible 
to me)


Any ideas will be very  much appreciated…




From: Fabrice Durand [mailto:fdur...@inverse.ca] 
Sent: 25 March 2020 14:18
To: packetfence-devel@lists.sourceforge.net
Subject: Re: [PacketFence-devel] Where is language list configured in 


Hello Eizens,

what you are searching for is probably here:






Le 20-03-23 à 13 h 10, Eizens Putnins a écrit :

To make easier to understand, what was done and what exactly is the problem:
Installation is Pacetfence 9.3 on debian 9. Upgraded from 9.0.3 because of
same problem with languages.
1. We downloaded packetfence_lv.po file from
https://www.transifex.com/inverse/packetfence/language/lv/ and added some
2. packetfence.po file header looks this way:
# Copyright (C) Inverse inc.
# English translations for PacketFence package.
# This file is distributed under the same license as the PacketFence
# Translators:
# Juris BALANDIS, 2017
msgid ""
msgstr ""
"Project-Id-Version: PacketFence\n"
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2020-03-21 01:44+0200\n"
"Last-Translator: inverse  <mailto:i...@inverse.ca> <i...@inverse.ca>\n"
"Language-Team: Latvian (http://www.transifex.com/inverse/packetfence/";
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: lv\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : "
3. Added lines for LV  to this file (after lines for italian):
# pf::web::constants (Locales)
msgid "lv_LV"
msgstr "lv_LV"
4. File renamed as packetfence.po and put into directory
5. Run  script /usr/bin/msgfmt to produce .mo file. Resulting file has name
messages.mo . 
6. Renamed messages.mo to packetfence.mo and changed owner to pf (chown -R
pf:pf ).
7. Added lv_LV to locales list in the file
Readonly::Array our @LOCALES =>
   qw(en_US es_ES fr_FR fr_CA de_DE he_IL it_IT lv_LV nl_NL pl_PL)
8. Rebooted machine.
Still don’t see LV language in the language choice in profiles (screenshot
I saw some very similar thread about Slovakian language, but for it this
steps worked, as much as I understand. But not for me.
By the way, as you can see, I deleted pt_BR  from list in
/usr/local/pf/lib/web/constants.pm , but it is still displayed, as you can
see on screenshot.
So this language list comes from some other place or is cached. 
Any ideas are highly appreciated.
From: Eizens Putnins [mailto:eiz...@maxicom.lv] 
Sent: 23 March 2020 15:16
To: packetfence-devel@lists.sourceforge.net 
Subject: Where is language list configured in Packetfence?
Importance: High
There does exist Packetfence translation file for Latvian language in
So I have added *.po and *.mo files for Latvian language from transifex into
lv_LV subdirectory, same way as  other languages:
/usr/local/pf/conf/locale/lv_LV/ .
This files are not 100% translated, but they have translation for all ever
needed parts (as we anyway prefer to have admin interface in English anyway,
and need just connection messages in local language).  
But files *.mo / *.po files are not a concern (we can translate anything
missing easy) – problem is that there is no Latvian language at all in the
list of available languages when configure access profiles. There are
multiple different languages (less than exist on transifex), so there must
be somewhere configuration of this list:
All language files which are in the list, exist in respective folders. So
there are also  Latvian language files, but for Latvian there is no entry in
the list. I can’t find any file where this list is configured, so may be
this language list is just hard-coded into respective scripts? It would be
not a problem also, if there would be documented which scripts I need to
edit to add a language.
Please, advice how to get Latvian language added to list -- it is not
described in documentation or elsewhere.  
Thanks in advance,
|Eižens Putniņš|CEO|Mob. +371 29459183| |eizens.putn...@maxicom.lv 
IT risinājumi Jūsu vajadzībām

PacketFence-devel mailing list

Fabrice Durand
fdur...@inverse.ca <mailto:fdur...@inverse.ca>  ::  +1.514.447.4918 (x135) ::  
www.inverse.ca <http://www.inverse.ca> 
Inverse inc. :: Leaders behind SOGo (http://www.sogo.nu) and PacketFence 
PacketFence-devel mailing list

Reply via email to