My solution for multilanguage products

Phoca Cart - complex e-commerce extension
PixelZombie
Phoca Member
Phoca Member
Posts: 18
Joined: 05 Jun 2018, 13:10

My solution for multilanguage products

Post by PixelZombie »

Hey Phoca Cart Users :-)

I just want to share my solution to multilanguage products in case you need that too.

I used this Plugin:
https://www.joomlack.fr/en/download-joo ... nguages-ck

and then I just added the language tags in the product description.

Code: Select all

{langck=de-DE}

german text to show

{/langck}

{langck=en-GB}

english text to show

{/langck}
this also works in product attribute titles, specification key values (also specification group titles) and so on.

Code: Select all

{langck=de-DE}Größe{/langck}{langck=en-GB}Size{/langck}
{langck=de-DE}Spezifikation{/langck}{langck=en-GB}Specification{/langck}
It gets a bit messy to look at in the backend, but It's working just fine :-)

Cheers

Frank
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: My solution for multilanguage products

Post by Jan »

Hi, great to hear it. Thank you very much for the hint and for the guide.

Jan
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: My solution for multilanguage products

Post by Jan »

If you find Phoca extensions useful, please support the project
PixelZombie
Phoca Member
Phoca Member
Posts: 18
Joined: 05 Jun 2018, 13:10

Re: My solution for multilanguage products

Post by PixelZombie »

You're welcome :-)
PixelZombie
Phoca Member
Phoca Member
Posts: 18
Joined: 05 Jun 2018, 13:10

Re: My solution for multilanguage products

Post by PixelZombie »

I just noticed that the plugin I recommended, does not work in admin views. The simplest solution would be to comment the following lines in

plugins/system/multilanguagesck/multilanguagesck.php

Code: Select all

if ($app->isAdmin()) {
            return false;
        }
But since the plugin is GNU/GPL, I think I'll copy it and make this part configurable or even publish it as a phoca cart plugin.

Cheers

Frank
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: My solution for multilanguage products

Post by Jan »

Hi, this will be great.

Jan
If you find Phoca extensions useful, please support the project
PixelZombie
Phoca Member
Phoca Member
Posts: 18
Joined: 05 Jun 2018, 13:10

Re: My solution for multilanguage products

Post by PixelZombie »

Oh Jan,
I just noticed that this plugin isn't working in E-Mails. Could you check if the content is rendered with the content/system-plugins?

Cheers

Frank
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: My solution for multilanguage products

Post by Jan »

Hi, if the content plugin should be applied a part should be ready for this (e.g. description will be set so it accepts content plugin) but system plugin do not have any such rule, they just apply on the rendered code :idea:

Jan
If you find Phoca extensions useful, please support the project
PixelZombie
Phoca Member
Phoca Member
Posts: 18
Joined: 05 Jun 2018, 13:10

Re: My solution for multilanguage products

Post by PixelZombie »

Mhm, I don't know if it's possible but maybe prerender the mails before they are send out?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: My solution for multilanguage products

Post by Jan »

Not sure but maybe we can try to apply this:
https://www.phoca.cz/documents/16-jooml ... t-articles
for the email text:
administrator\components\com_phocacart\libraries\phocacart\order\status.php

cca 475 for $body and $bodyOthers

Code: Select all

$body  = JHTML::_('content.prepare', $body);
:idea:

Jan
If you find Phoca extensions useful, please support the project
Post Reply