Sponsored Content
Special Forums Windows & DOS: Issues & Discussions Unix text doc with a .gif image Post 82945 by sunita_rao on Thursday 8th of September 2005 06:22:55 PM
Old 09-08-2005
The file is an invoice on which we need to place a logo that will show the organisation's accreditation. So yes, it would be rich text. At the moment the invoices don't nat have any logos so there's no problem printing it.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

converting PDF to text, rtf doc format

Hi all Is there any program which can convert PDF to word processor file ? If the PDF has smart quotes, bullet icons, copyright and trademark symbols, etc. what happens to them intext format? So ideally would like to conver into rtf or doc. Thanks SS (1 Reply)
Discussion started by: saurya_s
1 Replies

2. Shell Programming and Scripting

Stamping Text on an Image File

Hi all, again, I have lots of questions I guess. This one should be easier though :) . I have a goal to be able to put some preformatted text into a template (which is now a tiff file, but can be changed) and then output it to a printer. Right now we're thinking PostScript might work or some... (0 Replies)
Discussion started by: pageld
0 Replies

3. Shell Programming and Scripting

replacing text in an ascii doc

What would be the best way to replace all instances of... 09/26/2005 with 20050926 There are no spaces between the the date and the preceeding and following data. example lines looks like... snp01|NAME/OF/A/GROUP|09/26/2005081343|502 the 081343 is the time without colons. Thank... (6 Replies)
Discussion started by: cubs0729
6 Replies

4. Shell Programming and Scripting

Redirect text to image file

How can I redirect text data to an image (png, jpg, gif... etc) file using perl on unix solaris environment?? Please suggest. Pooja (1 Reply)
Discussion started by: wadhwa.pooja
1 Replies

5. Shell Programming and Scripting

Add text to image files

Hi to all, Some help here please. I have a several image files (photos, jpg files), let say 100 photos, and a list of 100 different little comments in a text file, each comment for each image. Somebody knows if I can add (like a watermark in the bottom) this text comments and how in the... (3 Replies)
Discussion started by: cgkmal
3 Replies

6. Shell Programming and Scripting

Creating word document (.doc) with attachment in unix solaris

Hi All, Is it possible to creation a word document (.doc) in unix solaris which includes an attachment (i.e similar to insert -> object add attachment in windows) Requirement is to add files into .doc and the files is present in unix servers. Is it possible to do this within unix instead... (5 Replies)
Discussion started by: ajay547
5 Replies

7. UNIX for Dummies Questions & Answers

Advice needed regarding Unix doc/book

I am a newbie Oracle DBA. All our oracle servers are hosted in AIX and Solaris Environment. I have no knowledge about this Unix O/S. So, it will be great if anyone here can suggest me any good book which will teach me the basics. Any inputs/suggestions will be great for me. (1 Reply)
Discussion started by: sandip250382
1 Replies

8. Shell Programming and Scripting

How to annotate text on image files?

Dear Sir, The problem description as follows I have a folder named abc with files of different extensions such as: bcsu.txt hsdk.prot ajia.sh sai.hm abcd_1213_saj.png I am supposed to write a bash script which reads all the .png files and read the 6th7th8th9th(word/numerals) here it is... (5 Replies)
Discussion started by: bal_nair
5 Replies

9. Shell Programming and Scripting

Script to convert text to image

Hi Can someone help me writing a script to convert the texts in a text file into images for each token? Thanks in advance. :) (1 Reply)
Discussion started by: my_Perl
1 Replies

10. Web Development

Center image between two text paragraphs.

I want to show a page with an image between 2 any paragraphs. I tried the following script. But the image is not centered. SUSE Paste <!DOCTYPE html> <html> <head> <style> center.center_1 { margin: auto; width: 60%; ... (3 Replies)
Discussion started by: jcdole
3 Replies
Petal::I18N(3pm)					User Contributed Perl Documentation					  Petal::I18N(3pm)

NAME
Petal::I18N - Attempt at implementing ZPT I18N for Petal SYNOPSIS
in your Perl code: use Petal; use Petal::TranslationService::Gettext; my $translation_service = new Petal::TranslationService::Gettext ( locale_dir => '/path/to/my/app/locale', target_lang => gimme_target_lang(), ); my $template = new Petal ( file => 'example.html', translation_service => $translation_service ); # we want to internationalize to the h4x0rz 31337 l4nGu4g3z. w00t! my $translation_service = Petal::TranslationService::h4x0r->new(); my $template = new Petal ( file => 'silly_example.xhtml', translation_service => $ts, ); print $template->process (); I18N Howto Preparing your templates: Say your un-internationalized template looks like this: <html xmlns:tal="http://purl.org/petal/1.0/"> <body> <img src="/images/my_logo.png" alt="the logo of our organisation" /> <p>Hello, <span petal:content="user_name">Joe</span>.</p> <p>How are you today?</p> </body> </html> You need to markup your template according to the ZPT I18N specification, which can be found at http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/ZPTInternationalizationSupport <html xmlns:tal="http://purl.org/petal/1.0/" xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:domain="my_app"> <body> <img src="/images/my_logo.png" alt="the logo of our organisation" i18n:attributes="alt" /> <p i18n:translate="">Hello, <span petal:content="user_name">Joe</span>.</p> <p i18n:translate="">How are you today?</p> </body> </html> Extracting I18N strings: Once your templates are marked up properly, you will need to use a tool to extract the I18N strings into .pot (po template) files. To my knowledge you can use i18ndude (standalone python executable), i18nextract.py (part of Zope 3), or I18NFool. I use i18ndude to find strings which are not marked up properly with i18n:translate attributes and I18NFool for extracting strings and managing .po files. Assuming you're using i18nfool: mkdir -p /path/to/my/app/locale cd /path/to/my/app/locale i18nfool-extract /path/to/my/template/example.html mkdir en mkdir fr mkdir es i18nfool-update Then you translate the .po files into their respective target languages. When that's done, you type: cd /path/to/my/app/locale i18nfool-build And it builds all the .mo files. Making your application use a Gettext translation service: Previously you might have had: use Petal; # lotsa code here my $template = Petal->new ('example.html'); This needs to become: use Petal; use Petal::TranslationService::Gettext; # lotsa code here my $template = Petal->new ('example.html'); $template->{translation_service} = Petal::TranslationService::Gettext->new ( locale_dir => '/path/to/my/app/locale', target_lang => gimme_language_code(), ); Where gimme_language_code() returns a language code depending on LC_LANG, content-negotiation, config-file, or whatever mechanism you are using to decide which language is desired. And then? And then that's it! Your application should be easily internationalizable. There are a few traps / gotchas thought, which are described below. BUGS, TRAPS, GOTCHAS and other niceties Translation Phase The translation step takes place ONLY ONCE THE TEMPLATE HAS BEEN PROCESSED. So if you have: <p i18n:translate="">Hello, <span i18n:name="user_login" tal:replace="self/user_login">Joe</span> </p> It most likely will not work because the tal:replace would remove the <span> tag and also the i18n:name in the process. This means that instead of receiving something such as: Hello, ${user_login} The translation service would receive: Hello, Fred Flintstone Or Hello, Joe SixPack etc. To fix this issue, use tal:content instead of tal:replace and leave the span and its i18n:name attribute. Character sets I haven't worried too much about them (yet) so if you run into trouble join the Petal mailing list and we'll try to fix any issues together. Limitations At the moment, Petal::I18N supports the following constructs: xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate i18n:domain i18n:name i18n:attribute It does *NOT* (well, not yet) support i18n:source, i18n:target or i18n:data. perl v5.12.4 2011-08-25 Petal::I18N(3pm)
All times are GMT -4. The time now is 09:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy