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.

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