Post by czorny » Sun May 05, 2013 10:07 pm

This may seem strange at first, but there's a need for multilingual currency symbol. For example, Russian Ruble doesn't have common symbol, so we usually write first 3 letters of currency's name: "руб.". In English it's different - RUB. I'm pretty sure there're other currencies with similar issue - Ukranian hryvna for starters.

New member

Posts

Joined
Sat Sep 08, 2012 2:37 am

Post by czorny » Fri May 10, 2013 5:55 pm

In case anybody needs this as well, here's a simple code to alternative currency symbol:

Code: Select all

<modification>
	<id><![CDATA[Currency related]]></id>
	<version><![CDATA[1.0]]></version>
	<vqmver><![CDATA[2.1.5]]></vqmver>
	<author><![CDATA[The Krotek]]></author>
	<file name="system/library/currency.php">		
		<operation>
			<search position="after" offset="1"><![CDATA[$currency = $this->code;]]></search>
			<add><![CDATA[
  			if (($this->currencies[$this->code]['currency_id'] = '4') && ($this->session->data['language'] == "en"))
  			{
  				$symbol_right = " RUB";
			}			
			]]></add>
		</operation>
	</file>
</modification>
Use VQMod and just cope-paste this code or edit system/library/currency.php manually. You can add as much languages as you want - just add the same "if" condition and change currency_id, language and symbol_right values accordingly.

New member

Posts

Joined
Sat Sep 08, 2012 2:37 am
Who is online

Users browsing this forum: No registered users and 5 guests