Lines Matching refs:this

29         $this->loadTranslationNamespaces();
32 $this->LN = confToHash(__DIR__ . '/lang/langnames.txt');
35 $this->opts = $this->getConf('display');
36 $this->opts = explode(',', $this->opts);
37 $this->opts = array_map('trim', $this->opts);
38 $this->opts = array_fill_keys($this->opts, true);
46 if (in_array($dfl, $this->translations)) {
47 $this->defaultlang = $dfl;
49 $this->defaultlang = '';
50 array_unshift($this->translations, '');
53 $this->translationNs = cleanID($this->getConf('translationns'));
54 if ($this->translationNs) $this->translationNs .= ':';
58 * Parse 'translations'-setting into $this->translations
63 $this->translations = strtolower(str_replace(',', ' ', $this->getConf('translations')));
64 $this->translations = array_unique(array_filter(explode(' ', $this->translations)));
65 sort($this->translations);
76 [$lng] = $this->getTransParts($id);
89 $rx = '/^' . $this->translationNs . '(' . implode('|', $this->translations) . '):(.*)/';
103 $langs = $this->translations;
124 if ($lng && in_array($lng, $this->translations)) {
125 $link = ':' . $this->translationNs . $lng . ':' . $idpart;
128 $link = ':' . $this->translationNs . $idpart;
129 $name = $this->realLC('');
166 if ($this->translationNs && strpos($id, (string) $this->translationNs) !== 0) return false;
167 $skiptrans = trim($this->getConf('skiptrans'));
182 $curlc = $this->getLangPart($ID);
184 $about = $this->getConf('about');
185 if ($this->getConf('localabout')) {
186 [, $idpart] = $this->getTransParts($about);
187 [$about, ] = $this->buildTransID($curlc, $idpart);
208 [$lc, $idpart] = $this->getTransParts($id);
210 foreach ($this->translations as $t) {
212 [$link, $name] = $this->buildTransID($t, $idpart);
232 if (!$this->istranslatable($INFO['id'])) return '';
233 if ($checkage) $this->checkage();
235 [, $idpart] = $this->getTransParts($INFO['id']);
237 $out = '<div class="plugin_translation ' . ($this->getConf('dropdown') ? 'is-dropdown' : '') . '">';
240 if (isset($this->opts['title']) || $this->getConf('about')) {
242 if (isset($this->opts['title'])) $out .= $this->getLang('translations');
243 if ($this->getConf('about')) $out .= $this->showAbout();
244 if (isset($this->opts['title'])) $out .= ': ';
249 foreach ($this->translations as $t) {
250 [$type, $text, $attr] = $this->prepareLanguageSelectorItem($t, $idpart, $INFO['id']);
270 return $this->LN[$lang] ?? $lang;
283 [$target, $lang] = $this->buildTransID($lc, $idpart);
290 'title' => $this->getLocalName($lang),
302 if (isset($this->opts['flag'])) {
307 if (isset($this->opts['name'])) {
308 $text .= hsc($this->getLocalName($lang));
309 if (isset($this->opts['langcode'])) $text .= ' (' . hsc($lang) . ')';
310 } elseif (isset($this->opts['langcode'])) {
327 if (!$this->getConf('checkage')) return;
329 $lng = $this->getLangPart($ID);
330 if ($lng == $this->defaultlang) return;
332 $rx = '/^' . $this->translationNs . '((' . implode('|', $this->translations) . '):)?/';
336 [$orig, ] = $this->buildTransID($this->defaultlang, $idpart);
342 $msg = sprintf($this->getLang('outdated'), wl($orig));
344 $difflink = $this->getOldDiffLink($orig, $INFO['lastmod']);
346 $msg .= sprintf(' ' . $this->getLang('diff'), $difflink);