By RKS on
So I've spent several hours trying to get i18n, locale, language switcher, and wondering why it wasn't translating anything on my site. After looking around I discover now that I have to translate everything and create alternate pages for all of this.
What is t() for then? I was under the impression that these modules would progmatically take the strings I print within t() and translate them.
The site I'm working on wants to be available in a multitude of different languages. I really don't have the time to translate every page, menu, piece of random content even if I just run it through Babelfish or something. What to do?
Comments
=-=
http://drupal.org/node/1268692
I think you're mistaken in your assessment. Did you download any additional languages?
_
I did not download any language packs. I just enabled them...I know..
But what I came to realize is what Jay mentions below, everything provided by Drupal out of the box can get translated with the languages, but the actual content you create on the page is not. So creating a basic page, with filter type PHP, and wrapping all your text with t() doesn't translate it with the languages.
That was what I thought i18n did like maybe even runs it through a translator and then caches the result. Something. I didn't know I had to translate everything first, create pages for the translated versions, and then i18n would allow people to redirect to those pages.
=-=
the t() is only part of the translation process. t() allows translators, translation packs to translate already known strings to be placed in the language packs. This process is not automated. Humans create the language packs to be used by physically translating each string.
content isn't already known by the translators. Thus there are no already existing translations of that content included in the language packs. Entire dictionaries, and grammar rules for each language would need to be put into place to translate content from one language to another without human interaction. IIRC this has yet to be accomplished.
_
I don't think it has been accomplished either, but I don't think it will as a language pack. It makes sense what you say and an entire dictionary, grammar, phrasing, etc would be a huge pack. Probably not reasonable for storing unless you have a lot of power to push something like that, especially when thinking about real time translating, etc.
What I was actually thinking is that the language packs were something that integrated with an outside site like Babelfish or something. So when it translates content (maybe on Cron or something) that it takes the content wrapped in t(), sends it to the outside site, translates it, caches it, and then it is accessible on the site. In that way, it isn't keeping any dictionaries or anything, just ntegrating with something else that already has those saved.
Looking at it that way, there are plenty of modules that integrate with an outside site so i think this would be more realistic than saving everything in the dB. Make sense? Or did I confound the whole thing again?
I had to do this!
A client insisted it all be translated but was unwilling to translate their content.
I simply used Google Translate. By creating custom urls, it is easy to automatically translate your page "on the fly".
I provide free Drupal support on Thursdays: booking calendar coming soon.
The t() function enables text
The t() function enables text to be translated. No software in the world accurately does translations yet. However, you can download language packs which will contain translations for much of the user interface, but not for any custom content, and with contributed modules, some will have translation files, but most won't.
If you want your site in more than one language, be prepared to spend time translating, or to pay someone to do your translations (and still time to put the translations into the site). It's a fairly intensive process.
Contact me to contract me for D7 -> D10/11 migrations.
_
Yeah that's the sucky part I found out. Maybe I can talk it down to one or two translations, maybe even just the most used languages globally. Or maybe I can just push for Esperanto and hope that whole thing works out sooner rather than later.
I just use this:
I just use this: http://drupal.org/project/translate_this
Works very well for my clients.
Problue Solutions