Translate a module in product view file

  • Posts: 1031
  • Thank you received: 11
  • Hikashop Business
3 weeks 6 days ago #361115

-- HikaShop version -- : 5.0.2
-- Joomla version -- : 3.10.12

Hi!

I have a Custom type module inserted in product view file and i want to traslate it.

The module is here

<div id="hikashop_product_contact_main" class="hikashop_product_contact_main"><?php
	$contact = (int)$this->config->get('product_contact', 0);
	if(hikashop_level(1) && ($contact == 2 || ($contact == 1 && !empty($this->element->product_contact)))) {
		$css_button = $this->config->get('css_button', 'hikabtn');
?>
			<a href="<?php echo hikashop_completeLink('product&task=contact&cid=' . (int)$this->element->product_id . $this->url_itemid); ?>" class="<?php echo $css_button; ?>"><?php
				echo JText::_('CONTACT_US_FOR_INFO');
			?></a>
<?php
	}
?>
		</div>
		
		[b]<div>{module Size Charts}</div>[/b]
		
	<span id="hikashop_product_id_main" class="hikashop_product_id_main">
		<input type="hidden" name="product_id" value="<?php echo (int)$this->element->product_id; ?>" />
	</span>

<?php if(!empty($this->element->extraData->rightEnd)) { echo implode("\r\n",$this->element->extraData->rightEnd); } ?>

</div>

If i assign the module to Greek it still shows up in English language.

Thank you

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 81851
  • Thank you received: 13138
  • MODERATOR
3 weeks 6 days ago #361117

Hi,

So, since you're using the {module} tag, I suppose you must be using the Modules Anywhere extension which handles the display of these tags:
regularlabs.com/modulesanywhere
From what I can see on their changelog ( regularlabs.com/modulesanywhere/changelog ) they mention that they fixed an issue with the support of language assignment being ignored for the 7.0.0, 7 years ago.
So I can only suppose that it supports this.
I would recommend contacting their support regarding this issue because we don't know the details of how modules anywhere works and thus we can't provide support on it.

The following user(s) said Thank You: verzevoul

Please Log in or Create an account to join the conversation.

  • Posts: 1031
  • Thank you received: 11
  • Hikashop Business
3 weeks 6 days ago #361120

I will try that sure.
Besides the Modules Anywhere extension is there another way to do this?

Please Log in or Create an account to join the conversation.

  • Posts: 81851
  • Thank you received: 13138
  • MODERATOR
3 weeks 5 days ago #361121

No, what you did with Modules Anywhere is what I would usually recommend.

The following user(s) said Thank You: verzevoul

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum