If you want to translate prefix in other Language please follow below Steps that translate prefix option in other language in frontend.
Note: Please installed language pack before these changes.
Copy: /app/code/core/Mage/Customer/Model/Address/Abstract.php to /app/code/local/Mage/Customer/Model/Address/Abstract.php
Replace:
public function getName()
{
$name = '';
$config = Mage::getSingleton('eav/config');
if ($config->getAttribute('customer_address', 'prefix')->getIsVisible() && $this->getPrefix()) {
$name .= $this->getPrefix() . ' ';
}
$name .= $this->getFirstname();
if ($config->getAttribute('customer_address', 'middlename')->getIsVisible() && $this->getMiddlename()) {
$name .= ' ' . $this->getMiddlename();
}
$name .= ' ' . $this->getLastname();
if ($config->getAttribute('customer_address', 'suffix')->getIsVisible() && $this->getSuffix()) {
$name .= ' ' . $this->getSuffix();
}
return $name;
}
with:
public function getName()
{
$name = '';
$config = Mage::getSingleton('eav/config');
if ($config->getAttribute('customer_address', 'prefix')->getIsVisible() && $this->getPrefix()) {
$preFix = $this->getPrefix();
$name .= Mage::helper('customer')->__($preFix) . ' ';
}
$name .= $this->getFirstname();
if ($config->getAttribute('customer_address', 'middlename')->getIsVisible() && $this->getMiddlename()) {
$name .= ' ' . $this->getMiddlename();
}
$name .= ' ' . $this->getLastname();
if ($config->getAttribute('customer_address', 'suffix')->getIsVisible() && $this->getSuffix()) {
$name .= ' ' . $this->getSuffix();
}
return $name;
}
Copy: /app/code/core/Mage/Customer/Model/Customer.php to /app/code/local/Mage/Customer/Model/Customer.php
Replace:
public function getName()
{
$name = '';
$config = Mage::getSingleton('eav/config');
if ($config->getAttribute('customer', 'prefix')->getIsVisible() && $this->getPrefix()) {
$name .= $this->getPrefix() . ' ';
}
$name .= $this->getFirstname();
if ($config->getAttribute('customer', 'middlename')->getIsVisible() && $this->getMiddlename()) {
$name .= ' ' . $this->getMiddlename();
}
$name .= ' ' . $this->getLastname();
if ($config->getAttribute('customer', 'suffix')->getIsVisible() && $this->getSuffix()) {
$name .= ' ' . $this->getSuffix();
}
return $name;
}
with:
public function getName()
{
$name = '';
$config = Mage::getSingleton('eav/config');
if ($config->getAttribute('customer', 'prefix')->getIsVisible() && $this->getPrefix()) {
$preFix = $this->getPrefix();
$name .= Mage::helper('customer')->__($preFix) . ' ';
}
$name .= $this->getFirstname();
if ($config->getAttribute('customer', 'middlename')->getIsVisible() && $this->getMiddlename()) {
$name .= ' ' . $this->getMiddlename();
}
$name .= ' ' . $this->getLastname();
if ($config->getAttribute('customer', 'suffix')->getIsVisible() && $this->getSuffix()) {
$name .= ' ' . $this->getSuffix();
}
return $name;
}
Copy /app/code/core/Mage/Customer/Block/Address/Renderer/Default.php to /app/code/local/Mage/Customer/Block/Address/Renderer/Default.php
Replace:
public function render(Mage_Customer_Model_Address_Abstract $address, $format=null)
{
switch ($this->getType()->getCode()) {
case 'html':
$dataFormat = Mage_Customer_Model_Attribute_Data::OUTPUT_FORMAT_HTML;
break;
case 'pdf':
$dataFormat = Mage_Customer_Model_Attribute_Data::OUTPUT_FORMAT_PDF;
break;
case 'oneline':
$dataFormat = Mage_Customer_Model_Attribute_Data::OUTPUT_FORMAT_ONELINE;
break;
default:
$dataFormat = Mage_Customer_Model_Attribute_Data::OUTPUT_FORMAT_TEXT;
break;
}
$formater = new Varien_Filter_Template();
$attributes = Mage::helper('customer/address')->getAttributes();
$data = array();
foreach ($attributes as $attribute) {
/* @var $attribute Mage_Customer_Model_Attribute */
if (!$attribute->getIsVisible()) {
continue;
}
if ($attribute->getAttributeCode() == 'country_id') {
$data['country'] = $address->getCountryModel()->getName();
} else if ($attribute->getAttributeCode() == 'region') {
$data['region'] = Mage::helper('directory')->__($address->getRegion());
} else {
$dataModel = Mage_Customer_Model_Attribute_Data::factory($attribute, $address);
$value = $dataModel->outputValue($dataFormat);
if ($attribute->getFrontendInput() == 'multiline') {
$values = $dataModel->outputValue(Mage_Customer_Model_Attribute_Data::OUTPUT_FORMAT_ARRAY);
// explode lines
foreach ($values as $k => $v) {
$key = sprintf('%s%d', $attribute->getAttributeCode(), $k + 1);
$data[$key] = $v;
}
}
$data[$attribute->getAttributeCode()] = $value;
}
}
if ($this->getType()->getHtmlEscape()) {
foreach ($data as $key => $value) {
$data[$key] = $this->escapeHtml($value);
}
}
$formater->setVariables($data);
$format = !is_null($format) ? $format : $this->getFormat($address);
return $formater->filter($format);
}
With:
public function render(Mage_Customer_Model_Address_Abstract $address, $format=null)
{
switch ($this->getType()->getCode()) {
case 'html':
$dataFormat = Mage_Customer_Model_Attribute_Data::OUTPUT_FORMAT_HTML;
break;
case 'pdf':
$dataFormat = Mage_Customer_Model_Attribute_Data::OUTPUT_FORMAT_PDF;
break;
case 'oneline':
$dataFormat = Mage_Customer_Model_Attribute_Data::OUTPUT_FORMAT_ONELINE;
break;
default:
$dataFormat = Mage_Customer_Model_Attribute_Data::OUTPUT_FORMAT_TEXT;
break;
}
$formater = new Varien_Filter_Template();
$attributes = Mage::helper('customer/address')->getAttributes();
$data = array();
foreach ($attributes as $attribute) {
//echo $attribute->getAttributeCode(); echo '<br />';
/* @var $attribute Mage_Customer_Model_Attribute */
if (!$attribute->getIsVisible()) {
continue;
}
if ($attribute->getAttributeCode() == 'prefix') {
$prefixopt = $address->getPrefix();
}
if ($attribute->getAttributeCode() == 'country_id') {
$data['country'] = $address->getCountryModel()->getName();
} else if ($attribute->getAttributeCode() == 'region') {
$data['region'] = Mage::helper('directory')->__($address->getRegion());
} else {
$dataModel = Mage_Customer_Model_Attribute_Data::factory($attribute, $address);
$value = $dataModel->outputValue($dataFormat);
if ($attribute->getFrontendInput() == 'multiline') {
$values = $dataModel->outputValue(Mage_Customer_Model_Attribute_Data::OUTPUT_FORMAT_ARRAY);
// explode lines
foreach ($values as $k => $v) {
$key = sprintf('%s%d', $attribute->getAttributeCode(), $k + 1);
$data[$key] = $v;
}
}
$data[$attribute->getAttributeCode()] = $value;
}
}
$data['prefix'] = Mage::helper('customer')->__($prefixopt);
if ($this->getType()->getHtmlEscape()) {
foreach ($data as $key => $value) {
$data[$key] = $this->escapeHtml($value);
}
}
$formater->setVariables($data);
$format = !is_null($format) ? $format : $this->getFormat($address);
return $formater->filter($format);
}
Make sure you have added the translation words in your translation CSV.
I have successfully done this in Magento 1.9.2.4