Page 1 of 1

polish langpack for phoca download

Posted: 05 Oct 2008, 12:29
by crazyluki
hi!
at attachment arrived to you - polish langpack for phoca download.
pl-PL.com_phocadownload.zip
i also made, and pack there - polish icon - new and hot!
jan - you should add this icon to translation, connect it ( if someone use joomfish, he will have only one icon, but two or more text translation). do you understand me ?

now i can`t switch site to english well, because, i have icons in polish language...
pl-PL.com_phocadownload.zip

Re: polish langpack for phoca download

Posted: 06 Oct 2008, 22:11
by Jan
Hi, thank you for the translation, yes the icons can be included in language pack but user need to install them manually, so maybe some information should be added:

e.g.:
install.icons.txt

copy icons you find in this language pack file into:
components/com_phocadownload/assets/images/

Jan

EDIT:
Added, thank you, Jan
https://www.phoca.cz/documentation/index.php/download/

Re: polish langpack for phoca download

Posted: 07 Oct 2008, 20:03
by crazyluki
yes, but i was thinking about some code modyfication
if lang == en then load icon-hot-EN.png
if lang == pl then load icon-hot-PL.png

it will be very usefull for multilang sites:)

Re: polish langpack for phoca download

Posted: 07 Oct 2008, 20:06
by Jan
ok, I must find some system solution

Re: polish langpack for phoca download

Posted: 14 Aug 2011, 18:40
by michele.olimpi
Landed here for the same problem after almost 3 years...
It seems that even phoca 2.8 does'nt support hot/new icon localization, so i tried to di myself.

In renderfront.php I've done this modification:
-----------------
function getOverImageIcons($date, $hits) {
$app = JFactory::getApplication();
$params = $app->getParams();
$css = $params->get( 'theme', 'phocadownload-grey' );
$new = $params->get( 'display_new', 0 );
$hot = $params->get( 'display_hot', 0 );

/* Hot/New icons localization directory
* Checks if the localized directory in /assets/images exists, then create the localized path.
* If localized path don't exists, use the standard path.
* Localized directory must be named the same of the language Tag
*/
$langUsed =& JFactory::getLanguage();
$langTag = $langUsed->get( 'tag','');
$hnDir = 'components/com_phocagallery/assets/images/';
if (is_dir($hnDir.$langTag.'/')) {
$hnDir .= $langTag.'/';
}


$output = '';
if ($new == 0) {
$output .= '';
} else {
$dateAdded = strtotime($date, time());
$dateToday = time();
$dateExists = $dateToday - $dateAdded;
$dateNew = (int)$new * 24 * 60 * 60;
if ($dateExists < $dateNew) {
$output .= JHTML::_('image', $hnDir.'icon-new.png', '', array('class' => 'pg-img-ovr1'));
}
}
if ($hot == 0) {
$output .='';
} else {
if ((int)$hot <= $hits) {
if ($output == '') {
$output .= JHTML::_('image', $hnDir.'icon-hot.png', '', array('class' => 'pg-img-ovr1'));
} else {
$output .= JHTML::_('image', $hnDir.'icon-hot.png', '', array('class' => 'pg-img-ovr2'));
}
}
}
return $output;
}

---------------------------------

I know, is a "dirty" solution, but it seems to work ok.
For making it work, you only have to add localized directory under /assets/images:
e.g.
.../assets/images/it-IT

Sorry for my bad php coding, I'm not a programmer :D

Re: polish langpack for phoca download

Posted: 19 Aug 2011, 14:34
by Jan
Hi, the best way is update the language pack.

Jan

Re: polish langpack for phoca download

Posted: 19 Aug 2011, 18:58
by michele.olimpi
But updating the language pack doesn't solve the problem that if I change the language the hot and new icon remains the same.

e.g.
en-> shows the icon "new"
it-> shows the icon "nuovo"

There is something that I haven't understand or I'm doing something wrong?

Re: polish langpack for phoca download

Posted: 20 Aug 2011, 23:53
by Jan
Hi, the icon in fact cannot work in multilanguage site, the icon does not change like language strings, so you need to select one specific icon which you will use on your site, in case you are using multiple site. - or then the code must be modified - with some if clause to change the icons by language.

Jan