Topic: How to translate plugin's name in the /sitemap page
Hello!
It's quite simple to translate Plugin's name at sitemap page. But what is the right place to put the translation?
** to take an effect you should reinstall plugin (or clear cache manually?)
1. It may be done by editing Sitemap plugin:
/plugins/box/sitemap/views/frontend/index.view.php
-- echo '<li><a href="'.Option::get('siteurl').Text::lowercase($component).'" target="_blank">'.__($component).'</a></li>';
++ echo '<li><a href="'.Option::get('siteurl').Text::lowercase($component).'" target="_blank">'.__($component,'sitemap').'</a></li>';
And add translation string into plugins/box/sitemap/languages/ru.lang.php
return array(
'sitemap' => array(
'Sitemap' => 'Карта сайта',
'News' => 'Новости',
)
);
But using this method, we have to keep track of all of the plugins in the universe!
2. You can do it by editing Plugin's language file (it's the best way if not bug - it's useful for plugin's developers, I think)
Only adding to /plugins/news/languages/ru.lang.php
return array(
'news' => array(
'News' => 'Новости',
),
''=>array( // '' - empty string
'News' => 'Новости',
)
);
Awilum, please, if it's right way?