4

I'm relatively new to Magento and working on a site build for a client and they simply need a list of phrases used throughout the site to be sent to a translator. I'm a little surprised that there isn't something simple and built into Magento for easily pulling this stuff out, which is why I'm writing here now. Is there a relatively simple way to extract translation phrases from a Magento app? Something built in that might not be obvious (to me)? or some useful library out there? This includes everything used in the templates (or controllers) like so:

$this->__("Some phrase on my website...");

... as well as cases in the layout XML where the 'translate' attribute is set, etc.

And taking this one step further, I'm aware of the available translations available from Magento here: http://www.magentocommerce.com/translations -- is there something simple to make sure I'm not double-doing it for phrases that might already exist in these packs?

And further still, is there a something to pull all translatables out of the database?

And if the answer for all this turns out to be 'no', I need to be very thorough with this so any advice on pitfalls or particular spots I need to be aware of where I might not think of pulling translations from, how you might have achieved something like this before, etc. -- I would love to hear your tips. Thanks!

Chris Forrette
  • 3,194
  • 2
  • 28
  • 37

3 Answers3

5

I know I'm late, but anyway, I’ve just uploaded an extension that does that: Language CSV Files Generator.
It only extracts strings from .php and .phtml files, I have no idea of how to get the .xml ones. Hope that someone out there could share some idea.
hope you like it

OSdave
  • 8,538
  • 7
  • 45
  • 60
1

Take a look in /app/locale/(language_country)/*.csv files.

B00MER
  • 5,471
  • 1
  • 24
  • 41
1

There are different solutions to get the strings from CSV files of Magento:

check the links The Ultimate Guide to Translating Magento (using Translation Memory software)

and How to translate Magento using OmegaT software

Sylvain Rayé
  • 2,456
  • 16
  • 23