Hello,
I am experiencing an issue with the translation functionality of the Tagger plugin. Here is a detailed description of the problem:
In my template, I am calling TaggerGetTags as follows:
[[!TaggerGetTags?
&rowTpl=`TaglisteTpl`
&groups=`[[!*SelectTags]]`
&translate=1
]]
I am using this chunk for translation:
[[!+tag:taggerTranslated=
tag]]
Here is the PHP snippet I am using:
<?php
$output = $input;
$options = $modx->getOption('options', $scriptProperties, '');
if (empty($options)) {
return $output;
}
if (!$modx->lexicon->exists('tagger.custom_' . $options . '.' . $input, $modx->getOption('cultureKey'))) {
return $output;
}
$output = $modx->lexicon('tagger.custom_' . $options . '.' . $input, [], $modx->getOption('cultureKey'));
return $output;
?>
Issue Description
I have translated all the lexicon entries correctly. However, I am encountering an issue where:
- When I make changes to the code and save it, the translated tags are displayed correctly upon the initial page refresh.
- After subsequent refreshes, the tags revert to displaying in English and remain in English thereafter.
Could you please assist me in resolving this issue so that the translated tags are consistently displayed?
Thank you!