the translation of plugin

  • Posts: 49
  • Thank you received: 0
9 years 6 months ago #202125

-- HikaShop version -- : 2.4.0
-- HikaMarket version -- : 1.6.2
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.5.9

Hi~
I've allowed our vendors could set thire own payment and shipping plugin. However, not all of our vendors know English well. How can I translate those names of these plugin?
Thank you~



Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 6 months ago #202160

Hi,

In the view "pluginmarket | add", please replace

		echo $row->name;
Into
		$translation_key = 'PLG_HIKASHOP'.strtoupper($this->plugin_type).'_'.strtoupper($row->element);
		if($translation_key != JText::_($translation_key))
			echo JText::_($translation_key);
		else
			echo $row->name;
It will allow you to translate the plugin names by creating translations like
PLG_HIKASHOPSHIPPING_MANUAL="Manual shipping"
PLG_HIKASHOPSHIPPING_UPS="UPS shipping"

PLG_HIKASHOPPAYMENT_BANKTRANSFER="Bank transfer"

We will add that patch in the next HikaMarket release.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Last edit: 9 years 6 months ago by Jerome. Reason: fix

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

  • Posts: 49
  • Thank you received: 0
9 years 6 months ago #202181

Hi

thank you for your response, However, I do not know coding very much
Could you tell me which file should I edit and the translations should be added in zh-CN.com_hikamarket.ini right?

BTW, when will the next HikaMarket release?

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 6 months ago #202186

Hi,

Like I wrote in my previous message, the view is the view "pluginmarket | add".
To edit a view, please see:
* www.hikashop.com/support/support/documen...-display.html#layout
* www.hikashop.com/support/documentation/i...op-view-listing.html
* www.hikashop.com/support/documentation/i...ashop-view-form.html

Thanks for the view editor in HikaShop, you will be able to edit the HikaMarket view and replace the line I gave by the 5 lines.

Once you have override the view, you will be able to add your translations overrides.
See: www.hikashop.com/download/languages.html#modify
In the HikaShop (and HikaMarket) configuration, you can manage the languages and you have a special zone where you can add your translation overrides.

About the new HikaMarket release my goal is to publish it end of this week.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 49
  • Thank you received: 0
9 years 6 months ago #202247

Hi

I've followed what you said, however, the language can not display
I added these code both in hikashop and market language files in the configuration

PLG_HIKASHOPSHIPPING_AUSTRALIAPOST="澳洲邮政"
PLG_HIKASHOPSHIPPING_CANADAPOST="加拿大邮政"
PLG_HIKASHOPSHIPPING_CANPAR="CANPAR"
PLG_HIKASHOPSHIPPING_ENVOIMOINSCHER="EnvoiMoinsCher"
PLG_HIKASHOPSHIPPING_FEDEX=" Fedex联邦快递"
PLG_HIKASHOPSHIPPING_MANUAL="UPS"
PLG_HIKASHOPSHIPPING_UPS="USPS"
PLG_HIKASHOPSHIPPING_USPS="其他快递邮寄"

however, It displays this in front

Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 6 months ago #202283

Hi,

My fault !
I fixed the code in my previous post to replace the line

echo $translation_key;
By
echo JText::_($translation_key);

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 49
  • Thank you received: 0
9 years 6 months ago #202373

Hi
It runs well now
Thank you~

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

Moderators: Obsidev
Time to create page: 0.082 seconds
Powered by Kunena Forum