Template & UTF-8

Discussion about writing code for Inkscape.
User avatar
PolyDawg
Posts: 15
Joined: Tue Feb 28, 2012 9:49 pm

Template & UTF-8

Postby PolyDawg » Tue Feb 28, 2012 9:54 pm

Hello,

I would like to make a template document and be able to change the text inside it with text extracted from a text file.

I need to create images in 5 languages (french, german, spanish, english and.... japaneze).

Does any one have experience with that or known extention to manage templating and/or use UTF-8 text in inkscape?

Thx a lot

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Template & UTF-8

Postby brynn » Wed Feb 29, 2012 8:43 am

Image
Welcome to InkscapeForum!

I could probably tell you how to do this using the gui. But since you've posted in the Programming subforum, I guess you want to do it by writing some kind of code? If that's the case, I can't help, but I thought I might ask a couple of questions, to gather info for those who can help. And honestly I might not even know the right questions to ask. Image

Is the final product going on the internet? Or in what kind of environment will it be used? And also, are you restricted to any certain programming language?

User avatar
PolyDawg
Posts: 15
Joined: Tue Feb 28, 2012 9:49 pm

Re: Template & UTF-8

Postby PolyDawg » Wed Feb 29, 2012 9:30 pm

Those images will be used on a webpage (buttons, clikable areas, ...) and in Second Life as texture.

I have no programming language restriction, but if could be in Python, directly usable that would be better or I'll code part of it if I get enough clues.

The steps would be :
1) Create template in inkscape with generic variable name like : {{PRESENTATION TITLE}}
2) Read translation file that are in UTF-8
3) Replace in my inkscape document the variables with corresponding values extracted from the files
4) Generate images from the template

Step 2 to 4 automatically done.

I need mainly feedback about people already doing this templating and UTF-8 in inkscape and then with those clues I could code it.

Thx


Return to “Programming”