| 1 |
<?php |
| 2 |
|
| 3 |
namespace Gettext\Languages\Exporter; |
| 4 |
|
| 5 |
class Docs extends Html |
| 6 |
{ |
| 7 |
/** |
| 8 |
* {@inheritdoc} |
| 9 |
* |
| 10 |
* @see \Gettext\Languages\Exporter\Exporter::isForPublicUse() |
| 11 |
*/ |
| 12 |
public static function isForPublicUse() |
| 13 |
{ |
| 14 |
return false; |
| 15 |
} |
| 16 |
|
| 17 |
/** |
| 18 |
* {@inheritdoc} |
| 19 |
* |
| 20 |
* @see \Gettext\Languages\Exporter\Exporter::getDescription() |
| 21 |
*/ |
| 22 |
public static function getDescription() |
| 23 |
{ |
| 24 |
return 'Build the page https://php-gettext.github.io/Languages/'; |
| 25 |
} |
| 26 |
|
| 27 |
/** |
| 28 |
* {@inheritdoc} |
| 29 |
* |
| 30 |
* @see \Gettext\Languages\Exporter\Exporter::toStringDo() |
| 31 |
*/ |
| 32 |
protected static function toStringDo($languages) |
| 33 |
{ |
| 34 |
$result = <<<'EOT' |
| 35 |
<!doctype html> |
| 36 |
<html lang="en"> |
| 37 |
<head> |
| 38 |
<meta charset="utf-8"> |
| 39 |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 40 |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
| 41 |
<meta name="author" content="Michele Locati"> |
| 42 |
<title>gettext plural rules - built from CLDR</title> |
| 43 |
<meta name="description" content="List of all language rules for gettext .po files automatically generated from the Unicode CLDR data" /> |
| 44 |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"> |
| 45 |
<link rel="stylesheet" href="style.css"> |
| 46 |
</head> |
| 47 |
<body> |
| 48 |
<a href="https://github.com/php-gettext/Languages" class="hidden-xs"><img style="position: fixed; top: 0; right: 0; border: 0; z-index: 2000" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub"></a> |
| 49 |
<div class="container-fluid"> |
| 50 |
|
| 51 |
EOT; |
| 52 |
$result .= static::buildTable($languages, true); |
| 53 |
$result .= <<<'EOT' |
| 54 |
|
| 55 |
</div> |
| 56 |
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script> |
| 57 |
<script src="script.js"></script> |
| 58 |
</body> |
| 59 |
</html> |
| 60 |
EOT; |
| 61 |
|
| 62 |
return $result; |
| 63 |
} |
| 64 |
} |
| 65 |
|