My solution for multilanguage products

PixelZombie
Phoca Member
Phoca Member
Posts: 18
Joined: 05 Jun 2018, 13:10

My solution for multilanguage products

Post by PixelZombie » 05 Jun 2018, 13:28

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: 40103
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: My solution for multilanguage products

Post by Jan » 06 Jun 2018, 16:48

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: 40103
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: My solution for multilanguage products

Post by Jan » 06 Jun 2018, 17:16

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 » 06 Jun 2018, 17:50

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 » 11 Jun 2018, 15:41

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: 40103
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: My solution for multilanguage products

Post by Jan » 11 Jun 2018, 21:35

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 » 15 Jun 2018, 17:36

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: 40103
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: My solution for multilanguage products

Post by Jan » 18 Jun 2018, 01:39

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 » 18 Jun 2018, 11:57

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: 40103
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: My solution for multilanguage products

Post by Jan » 19 Jun 2018, 14:17

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