## $Id$ ## Library of WML functions of general interest. ## This file is part of the CERN Document Server Software (CDSware). ## Copyright (C) 2002 CERN. ## ## The CDSware is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## The CDSware is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDSware; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## library of WML functions of general interest: <: sub generate_language_list_for_python { ## Return Python-ready language list out of user-configured WML language list. ## Input string example: en,sk,fr ## Output string: ['en','sk,'fr'] $out = "["; foreach $lang (split /\s*,\s*/, '') { $out .= "'".$lang."',"; } $out .= "]"; return $out; } :>