Magento translate file - magento

I am want translate magento. I am true translate some string in \app\locale\en_US, but I am not see result in admin panel. Why magento not show changed value in en_US folder. I am rename en_US folder but my site work with english. Why? I want copy \app\locale\en_US to \app\locale\my_lang translate. How I can do it, this folder with new translate work to my site. If I am translate all \app\locale\my_lang how I can add to site. And how I can see change during translate..

Have you selectect the right locale in admin (from footer of the page)?
If your translations are for a custom module ensure that you have defined the translation declarations in the etc/config.xml (frontend and/or adminhtml areas), otherwise ensure that you have modified the right module's translation file (eg if you have a string 'my string' that is present in Mage_Customer.csv and in Mage_Catalog.csv you must ensure that you have modified the proper one that is used where you want to see the result).
Also note that you can modify translations in app/design/package/theme folder...in a translate.csv called file.
The reason you see texts in english even if you delete translations folder is that they are by default passed in code through __() function in english. Magento checks if it finds the translation for the current locale in app/locale/ if it does it shows you that value, otherwise the original string passed to __() function is shown.

Related

Magento: change link from cart

I have Magento 1.7 installed, I have this theme called ves_gift, at the end of the Checkout (before clicking "checkout" actually) I have the terms of agreement:
The checkbox contains a link connected to the "privacy terms".
The point is that is a wrong/broken link, and I need to change its href, how do I fix it?
Also the word "Aaccetto" should be with one A only, not double. "Accetto" is the right word. Where is the translation file for that?
You need to find the template where the HTML contents of the checkbox. Then you can modify as per your wish.
Try installing Magento-Debug from magentocommerce, and find the template being used.
If you want to translate, then use the CSV file for translation in your theme, as per your language rather than hard-coding in Phtml files.
Remmeber : only Html strings echoed with $this->__('MYSAMPLETEXT'); can only be translated. So, in the CSV file you could do
MYSAMPLETEXT,MYTRANSLATEDTEXT
and then magento will translate the string for you, as simple as that.
file path:-
app\design\frontend\default\your-theme\template\checkout\onepage\agreements.phtml
if its work vote for me, and not let me know...
Thanks
Ravi

Is it possible to change text directly in the code

I would like to know if there is a way to change text in the code instead of using the admin panel? I have Filezilla installed and can access my site/files from there.
If I use the inspect element in any browser, I can see an HTML structure, but as I have understood there is no HTML document in Magento, right? So where do I go if I want to make a change to a text element on my site and I don't want to use the admin panel?
Most of the text elements are handled by Magento's language translation system.
Quite often, you don't have to mess around hacking templates, just simply add a line to the translation CSV with the text string exactly as it appears, add a comma and then the new text string you want Magento to display.
For example, if you're working with US English, you can use the following file in your own custom template package as follows:
app/design/frontend/default/your_package/locale/en_US/translate.csv
Let's for example, change one of the window shade bar titles in the One Page Shopping Cart. Add a line to translate.csv as follows:
"Billing Information","Billing Address Information"
How this works, in the template the following line normally displays the title:
<?php echo $this->__('Billing Address') ?>
This code snippet $this->__('Billing Address') is a call to Magento's language translation system. It reads the translate.csv file finds Billing Address and changes it to Billing Address Information when it assembles the page html.
Lotta people out there have made changing text like this far harder than it has to be.
Hunting down the proper template, changing the text, finding the template got messed up, or trying to remember after the fact what was changed.
VS.
Changing a simple central file that contains all the text string translations... Often only by adding a new line to the file
Magento actually makes this very simple.
Thank you! So magento stores all text in .csv? or just the stuff that needs to be translated? I'm making a search for .csv via Filezilla but I only get two languages (the site is translated to multiple languages). Should I be looking somewhere else?

Prestashop - blockuserinfo position & translation

I have an issue with blockuserinfo module. It displays in place which is not the best according to the layout. So i wanted to move it to different place. SO i did following thing - from blockuserinfo.tpl I copied element:
{if $logged}
<span>{$cookie->customer_firstname} {$cookie->customer_lastname}</span>
{l s='Log out' mod='blockuserinfo'}
{else}
{l s='Log in' mod='blockuserinfo'}
{/if}
and pasted into header.tpl to the place I wanted to have it. It appears and works BUT there is huge problem with translation - after pasting it into header.tpl data from blockuserinfo changed into english and I cannot change the language of those texts (even after switching the lang). In admin panel > module translation there is MISSING variable for login and logout under blockuserinfo.
How to repare it?
Translations in PS for module is working according to the module name. Like if you check your code, you will have static strings like
{l s='View my customer account' mod='blockuserinfo'}
The mod='blockuserinfo' says to the PS translation system to get the translation for that module line. So what you need to do is to remove parts of mod='blockuserinfo' from all the texts you have in the copied code at header.tpl file. Please note that all texts should be like
{l s='View my customer account'}
After that go to admin panel, and then translation section and then go to front end translation. Find header.tpl section and enter the translations again for the texts you need.
Again note that if you move a text from a file or a module, then its translation will not work, because, while fetching the translated text, PS looks to the translations according to the file name, or module name.
Hopefully this will help you.
Thank you

How can I preview Virtuemart2 Order verification email layout changes?

I am trying to change the layout ( css/html structure) of Virtuemart 2 order verification emails. Problem is that I have to make a fake purchase each and every time I do a change in the 10 different files (located # components/com_virtuemart/views/invoice/order/tmpl) that create this email template.
The closest "preview" I got was this direct access url "http://domain.com/index.php?option=com_virtuemart&view=invoice&layout=invoice&format=html&tmpl=component&virtuemart_order_id=1401"
But again it loads Joomla's head/body elements not the actual email template.
So how can I have a "preview" of how the template looks like with my new changes BEFORE make an actual test purchase? Is this possible?
You shouldn't change the core files otherwise the next update of VirtueMart (of which there are many) will erase your changes.
You should use Joomla!'s template overrides which VM2 supports that way you can update as needed to new versions without loosing your changes. See this article on docs.joomla.org on "How to override the output from the Joomla! core" and this one on template overrides.
3. You need to add the &format=raw at the end of the link to retrieve just the output of the component with out the template/html body wrapped around it. Of course that relies on the component as well.
I was going to suggest using raw, but looking at the current VM2 it doesn't properly support the format=raw option. Looking at the mail layout in the invoice view it not structured to return it the way you expect, it actually generates a HTML version by default with a matching text only version.
The best I could come up given those two options
Return a close equivalent of the HTML email
http://domain.com/index.php?option=com_virtuemart&view=invoice&layout=mail&virtuemart_order_id=1401&tmpl=component
Return the text version, albeit wrapped in the html page... you may have to view the source to see your invoice text.
http://shop.craigphillips.biz/index.php?option=com_virtuemart&view=invoice&layout=mail_raw&virtuemart_order_id=4&tmpl=component

Magento Language File for Admin-Customer Account Page

Maybe I'm just tired...but I can't seem to locate the language file relevant to the backend Customers>Manage Customers>Individual Record
I just want to change the form label "Suffix" to "Credentials".
Can you use inline translation to do it?

Resources