Jump to content

A couple of Questions regarding Currency and Languages


Recommended Posts

Hi all,

 

So I would like a couple of changes. I searched the forum and the internet and couldn't find an answer that helped me.

 

1. I would like for the Currencies and Languages to appear in a drop-down list/selector, as there are just so many and they look a bit messy at the moment. I'm using the Oslo theme and you can see the website in action here: www.shootbaby.co.uk/presta

 

2. I would like the Languages to show as a Language Name, not the ISO Code, for example 'English' instead of 'en'

 

My code in the blocklanguages.tpl file is this:

 

{*
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2015 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
<!-- Block languages module -->
{if count($languages) > 1}
<div id="languages-block-top" class="languages-block">
<ul id="first-languages" class="languages-block_ul">
{foreach from=$languages key=k item=language name="languages"}
<li {if $language.iso_code == $lang_iso}class="selected"{/if}>
{if $language.iso_code != $lang_iso}
{assign var=indice_lang value=$language.id_lang}
{if isset($lang_rewrite_urls.$indice_lang)}
<a href="{$lang_rewrite_urls.$indice_lang|escape:'html':'UTF-8'}" title="{$language.name}">
{else}
<a href="{$link->getLanguageLink($language.id_lang)|escape:'html':'UTF-8'}" title="{$language.name}">
{/if}
{/if}
<span>{$language.iso_code} </span>
{if $language.iso_code != $lang_iso}
</a>
{/if}
</li>
{/foreach}
</ul>
</div>
{/if}
<!-- /Block languages module -->
 
 

 

Thanks!

Penny

Edited by kinderyum (see edit history)
Link to comment
Share on other sites

Change this:

<span>{$language.iso_code} </span>
to this:

<span>{$language.name} </span>
If you want add show/hide function you need to edit modules adding js toggle function. How toggle works you can see here: http://jsfiddle.net/EwNRJ/2698/

 

 

 

Thank you, this worked for changing the Language ISO Codes to Language Name.

 

Unfortunately JS Toggle Function is beyond my knowledge, I will have to hire help I guess!

Edited by kinderyum (see edit history)
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...