You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
2.4 KiB

  1. <!doctype html>
  2. <?php
  3. // parse the locale.yaml file and get the variables
  4. include "Spyc.php";
  5. $localeYaml = Spyc::YAMLLoad('locale.yaml');
  6. $lang=$_GET['lang'];
  7. // optional code for reading the accept language header
  8. /*
  9. $acceptlang='de-DE';
  10. // get the accept-language header
  11. foreach (getallheaders() as $name => $value) {
  12. if ($name == 'Accept-Language'){
  13. // echo "$name $value";
  14. $acceptlang = $value;
  15. }
  16. }
  17. echo "$acceptlang";
  18. print "oi $lang oi";
  19. */
  20. if ( in_array ($lang, array('en-US'))){
  21. $loc1 = "$lang".".utf8";
  22. $loc = $lang;
  23. }
  24. else
  25. $loc = "de-DE";
  26. //$loc = "en-US";
  27. //print "$loc $loc1";
  28. $domain = "messages";
  29. setlocale(LC_MESSAGES, $loc);
  30. setlocale(LC_ALL, $loc);
  31. $results = putenv("LC_ALL=$loc");
  32. $results = putenv("LC_MESSAGES=$loc");
  33. $results = bindtextdomain($domain,"./locale");
  34. ?>
  35. <html >
  36. <head>
  37. <title>$localeYaml['title'][$loc]</title>
  38. <meta charset="utf-8">
  39. <meta name="viewport" content="width=device-width, initial-scale=1">
  40. <!-- Kube CSS -->
  41. <link rel="stylesheet" href="css/kube.min.css">
  42. <link rel="stylesheet" href="addons/kube-addons.min.css" />
  43. <link rel="stylesheet" href="master.css" />
  44. </head>
  45. <body>
  46. <div class="page is-container">
  47. <div class="main-sidebar text-centered">
  48. <img class="wmdelogo" alt="wikimedia logo" src="Wikimedia_Deutschland-Logo.svg"/>
  49. </div>
  50. <div class="main-content">
  51. <div class="is-row" style="border:0px solid blue">
  52. <div class="is-col is-70">
  53. <?php include "form.php" ?>
  54. </div>
  55. <div class="is-col is-30">
  56. <?php
  57. # $ct = @file_get_contents( "./locale/$loc/h1.php");
  58. # if ($ct==false)
  59. # $ct = file_get_contents( "h1.php");
  60. # echo $ct;
  61. ?>
  62. <?php
  63. $ct = @file_get_contents( "./locale/$loc/h2.php");
  64. if ($ct==false)
  65. $ct = file_get_contents( "h2.php");
  66. echo $ct;
  67. ?>
  68. </div>
  69. </div>
  70. <?php echo _($localeYaml['impressum'][$loc])?>: <a href="https://www.wikimedia.de/impressum/">https://www.wikimedia.de/impressum</a><br>
  71. <?php echo _($localeYaml['privacy'][$loc])?>: <a href="https://www.wikimedia.de/datenschutz/">https://www.wikimedia.de/datenschutz</a>
  72. </div>
  73. </div>
  74. <script src="js/kube.min.js"></script>
  75. <script src="addons/upload/kube.upload.min.js"></script>
  76. <script src="addons/kube-addons.min.js"></script>
  77. <script src="kaform.js"></script>
  78. <script src="iban.js/iban.js"></script>
  79. </body>
  80. </html>