Hello
It would be nice if it was possible to localize the link text.

Kind Regards
Ali Majdzadeh Kohbanani

CommentFileSizeAuthor
#11 print_pdf-i18n.patch906 bytesdevelcuy

Comments

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

That support has existed for a long time. The module has been translated into 22 languages already (Catalan, Czech, Danish, etc, etc.).

To translate it, get the translations/print.pot file and use a gettext-compatible translation tool (like poedit).

Regards,

Joao Ventura

Ali Majdzadeh Kohbanani’s picture

Joao,
Hello
Thanks for your response. I have translated the .pot file. What I mean, is not translatable. The string is somehow user defined. I am mentioning the "Printer-friendly version" string which exists at Advanced link options. It can not be translated. Any ideas?

Kind Regards
Ali Majdzadeh Kohbanani

jcnventura’s picture

Try resetting the settings in that form to the defaults and it should be translated...

Ali Majdzadeh Kohbanani’s picture

I have not changed anything. I have also searched the phrase, the translation exists for the same phrase, I mean the phrase which is displayed for example in node/add/story page, but not for the link text.

Kind Regards
Ali Majdzadeh Kohbanani

jcnventura’s picture

I don't understand which string you're referring to..

João

Ali Majdzadeh Kohbanani’s picture

João,
Please take a look at the following screen shot:
http://drupal.org/node/364587

Kind Regards
Ali Majdzadeh Kohbanani

jcnventura’s picture

That string is handled by the translation mechanism. A problem that may show up with multi-language installations is that after the print settings are saved, that string is fixed into the settings and may not be translated anymore (I am not sure as I never tried it exactly)..

As I said in #3, if you press the 'Reset to defaults' button in that form, the string should be translated normally again.

This should not be a problem in fixed-language sites, but my test site is not multi-language, so I can't really test and solve it in that setup.

João

Ali Majdzadeh Kohbanani’s picture

João,
It is true that the string is handled by the translation mechanism, but somehow the string should be introduced to the translation mechanism. Anyway, I think for these types of problems, the use of the new i18nstrings feature which is now present in the i18n module, could be a solution.
By the way, have you tried the Nodequeue module? Nodequeue has exactly the same configuration and also it has exactly the same problem which I filed a feature request for. (http://drupal.org/node/351085)
Unfortunately, current configuration of the Printer module is not desirable for multilingual sites.
Anyway, thanks a lot and hope to see this feature working in future releases of the module.

Kind Regards
Ali Majdzadeh Kohbanani

jcnventura’s picture

Status: Postponed (maintainer needs more info) » Fixed

Hi,

I have changed the way that these settings work, to prevent them from being 'saved' as a side-effect of saving any other setting of the modules.

I have also added a warning in the new form that saving the strings will disable the translation mechanism.

João

Ali Majdzadeh Kohbanani’s picture

João,
Hello
Thanks for your attention. I am going to give it a try.

Kind Regards
Ali Majdzadeh Kohbanani

develcuy’s picture

Version: 6.x-1.0 » 5.x-4.3
StatusFileSize
new906 bytes

This is patch for D5. It "patches" the url on fly, but is not that lovely about performance.

Blessings!

jcnventura’s picture

Status: Fixed » Active

Marking this active again so that I don't forget to check develCuy's patch.

jcnventura’s picture

Status: Active » Needs review

Better status..

jcnventura’s picture

Status: Needs review » Postponed (maintainer needs more info)

@develCuy: your patch has nothing to do with the subject of this issue. Are you trying to fix this: #299689: How to print different language versions of a page to PDF ?

If so, I fail to see how simply removing the language suffix from the path will do any good..

João

develcuy’s picture

Yes, it seems that #299689: How to print different language versions of a page to PDF applys better for my patch.
What I have "fixed" is to let tcpdf load images, since he loads images from image urls (which is weird), perhaps a cool regex which is able to distinguish between images and links will "do the magic", but my understanding of regexps is very limited.

Blessings!

jcnventura’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

I have moved the discussion in #11-#15 to a new issue: #388396: Remove i18n path suffix from image URLs used by TCPDF.

And since the original issue has been fixed for almost a month, I am closing the issue.

João

FreddieK’s picture

Old thread, but as I found it someone else might in a year or two as well.

If you have Internationalization enabled, then you can make module variables multilingual so you can customize them for the different languages as you see fit. See example here. The variable names for Print can be found in print.install line 291, i.e.:

  $vars = array(
    'print_html_link_text' => 'Printer-friendly version',
    'print_text_published' => 'Published on %site_name',
    'print_text_by' => 'By %author',
    'print_text_created' => 'Created %date',
    'print_text_source_url' => 'Source URL',
    'print_text_retrieved' => 'retrieved on %date',
    'print_text_links' => 'Links',
  );