How to change listing language in Magento
Who knows where to find the translation files for the price selections (see picture) I can't change this in the front end inline translation
Any h开发者_StackOverflow中文版elp would be appreciated.
Thanks.
Price and other sorting attributes title can be changed in Magento Admin Panel in Catalog -> Attributes -> Manage Attributes -> Edit Attribute -> Manage Labels / Options
where you can specify the attribute title for each store view.
There is only one exception... It is Position
option, that is a hard-coded value in sort by array. But you can change this value by editing locale file app/locale/[your_locale]/Mage_Catalog.csv
, just search for Position
text inside of it, and change value in the second column.
There may already be a set of translations for you to download. Start by going to http://www.magentocommerce.com/translations, then click "Select" for your language, then click "Package". Unzip the download into your magento directory and it will place a whole lot of CSV files where they need to go. You can edit these yourself with any spreadsheet program. You might need to clear the cache after importing or adjusting these files.
You can find the loop that fill the select box in this file:
app/design/frontend/base/default/template/catalog/product/list/toolbar.phtml
// line 81
...
foreach($this->getAvailableOrders() as $_key=>$_order):
...
Here is where the list of available order is set
// Line 424
app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php
From there, you could be able to trace the translation.
Hope this help!
Update:
Here the list of sort by is fetched The value seems to be in the attributes configuration
app/code/core/Mage/Catalog/Model/Config.php
// Line 339 in Mage_Catalog_Model_Config::getAttributeUsedForSortByArray()
I think you have to edit the database:
UPDATE `eav_attribute`
SET `frontend_label` = 'Reihenfolge'
WHERE `eav_attribute`.`attribute_code` ='position';
Here you can change Reihenfolge
to your preferred text.
For position you can translate in your theme's translate.csv file simply add an entry like so.
"Mage_Catalog::Position", "Popular"
to use the translation, change the template app/design/frontend/[theme]/template/catalog/product/list/toolbar.phtml
<?php echo $this->__($_order) ?>
to
<?php if ($_key=='position'): echo $this->__('Position'); else: echo $this->__($_order); endif; ?>
And add in [theme]/local/[language]/translate.csv
"Position","What you want"
精彩评论