Source code of Leftypol imageboard
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.
 
 
 
 
 

29 lines
613 B

<?php
class PoeditString {
public $key;
public $value;
public $fuzzy;
public $comments;
function __construct($key, $value = '', $fuzzy = false, $comments = array()) {
$this->key = $key;
$this->value = $value;
$this->fuzzy = $fuzzy;
$this->comments = (array)$comments;
}
public function __toString() {
$str ='';
foreach ($this->comments as $c) {
$str .= "#: $c\n";
}
if ($this->fuzzy) $str .= "#, fuzzy\n";
$str .= 'msgid "'.str_replace('"', '\\"', $this->key).'"' . "\n";
$str .= 'msgstr "'.str_replace('"', '\\"', $this->value).'"' . "\n";
$str .= "\n";
return $str;
}
}
?>