hi!
at attachment arrived to you - polish langpack for phoca download.
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...
polish langpack for phoca download
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: polish langpack for phoca download
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/
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/
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 32
- Joined: 15 Aug 2008, 21:39
Re: polish langpack for phoca download
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:)
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:)
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: polish langpack for phoca download
ok, I must find some system solution
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 2
- Joined: 14 Aug 2011, 18:23
- Location: Italy
Re: polish langpack for phoca download
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
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
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: polish langpack for phoca download
Hi, the best way is update the language pack.
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 2
- Joined: 14 Aug 2011, 18:23
- Location: Italy
Re: polish langpack for phoca download
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?
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?
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: polish langpack for phoca download
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
Jan
If you find Phoca extensions useful, please support the project