Jump to content

How to list the attributes on multilingual site


cedced

Recommended Posts

Hi,

 

I have a custom made module that lists the attributes for a search system and I am looking at making it multilingual as the site is, so the attributes shown on the site are translated depending on the site's language.

 

Here is the code in the module php that fetches the attributes :

	public function hookTop($params)
	{
		$attributes = $this->getCache('attributes');
		$maxprice = $this->getCache('maxprice');
		$this->smarty->assign(array(
			'the_dances' => $attributes['dance'],
			'the_publics' => $attributes['public'],
			'the_places' => $attributes['place'],
			'the_counties' => json_encode(array(		
				32 => $attributes[32], //france
				33 => $attributes[33],//italia
				34 => $attributes[34],//spain
				36 => $attributes[36],//germany
				37 => $attributes[37])),//uk
			'the_maxprice' => round($maxprice['maxprice'])));
		return $this->display(__FILE__, 'file.tpl');
	}

First, am I correct to assume that the extra code has to be put here?

 

Then, has anybody any solution so the attributes are translated on the site?

 

Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...