Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /* Poweradmin, a friendly web-based admin tool for PowerDNS.
  3. * See <http://www.poweradmin.org> for more details.
  4. *
  5. * Copyright 2007-2009 Rejo Zenger <rejo@zenger.nl>
  6. * Copyright 2010-2014 Poweradmin Development Team
  7. * <http://www.poweradmin.org/credits.html>
  8. *
  9. * This program is free software: you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation, either version 3 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  21. */
  22. /**
  23. * Interface localisation helper
  24. *
  25. * @package Poweradmin
  26. * @copyright 2007-2010 Rejo Zenger <rejo@zenger.nl>
  27. * @copyright 2010-2014 Poweradmin Development Team
  28. * @license http://opensource.org/licenses/GPL-3.0 GPL
  29. */
  30. if (file_exists('inc/config.inc.php')) {
  31. include_once("inc/config.inc.php");
  32. } else {
  33. $iface_lang = 'en_EN';
  34. }
  35. if ($iface_lang != 'en_EN') {
  36. $locale = setlocale(LC_ALL, $iface_lang, $iface_lang . '.UTF-8');
  37. if ($locale == false) {
  38. error(ERR_LOCALE_FAILURE);
  39. }
  40. $gettext_domain = 'messages';
  41. bindtextdomain($gettext_domain, "./locale");
  42. bind_textdomain_codeset($gettext_domain, 'utf-8');
  43. textdomain($gettext_domain);
  44. @putenv('LANG=' . $iface_lang);
  45. @putenv('LANGUAGE=' . $iface_lang);
  46. }