Translation of stencils

Started by Lars-Erik, March 09, 2009, 06:49:06 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Lars-Erik

A while back I made a document to easily translate stencils and documents, the result is a document that can read "language" files, and remember used translations. It will never ask you to translate the same word twice. You can import and export translation documents, etc. It will translate all open stencils and documents.

That said, it's something I did a time ago, its no where bug free or optimal, but it does the trick. Perhaps someone has a use for it, or parts of it.

So use it if you can, I will answer questions etc if there are any.

- Lars

davidoff

Downloaded but try to understand how it works ?
i know i should run macro but can you make a bit clear for me?

Lars-Erik

1- Open a stencil/document or multiple ones you want to translate
2- Open the translate.vsd
3- Make sure the document TO BE TRANSLATED is active
4- Run the macro TranslateStencil, using the Tools->Macro menu
5- Set the amount of custom properties should be checked per shape (I know this should be automated ;))
6- The macro will start asking you for translations... save them so youll never get asked for the same one twice

7- You can use list know translations to let visio show you what translations were used and stored (these will be automaticly used if it finds on of these words (not parts of only full words)) are found.
8- Remove know translations using the "Remove1Translation" macro
9- Reset all known translations using the "ResetKnownTranslations" macro
10- Store or reload known translations (so save or reload the list generated at step 7) using the import and export functions

- Lars

Visio Guy

Anybody got any ideas on how we could web-ify something like this and build an on-line database of translations? Might be cool to subscribe to the VG forum's Vis-translation web service or something cool like that, but I'm not sure how hard it would be to get it going--and to allow us all to easily add translations so that it grows and grows.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Lars-Erik

Cool plan, but rather tricky/time consuming to set up.

Also, the stencil would need tweaking, when I put this together I wasn't thinking of making it easy or foolproof, it just had to do what I needed it to.

I'll brainstorm on this some more tomorrow.

- Lars

Visio Guy

I was thinking of a web-based database of terms, nothing linked directly to stencils - just some sort of community resource.

Btw, watching the Dutch baseball team play Puerto Rico for the Group D championship in the World Baseball Classic. Bet you didn't know you guys even had a team, eh? :)
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Lars-Erik

Specific to Visio terms then?

I knew we had a team, though I never seen them on TV or anything.

d310gece

Anyone still working for translation of stencils ? I have an idea how to make it. I'am currently working on it. I just missing few pieces of puzzle to make it work :) I've posted these questions in other place of these forums but didn't get the answer.

Ok, now about my drawing. I have shapes which are connected to excel cells. I use data graphic to format them and I need to change them from time to time. There is only one problem - data graphic changes the font when it is applied. I am looking for a way to disable it. I think that it is somewhere in text callout shape sheet but I am still new to all these things so I would really appreciate any help.
BTW I am working with Visio2007

And another question. Is it a way to make a group of shapes to be selected while pressing CTRL+A. Now when I press CTRL+A i got only group selected not members. Changes in behavior window doesn't solve that.

Yacine

I do work on a small translation tool, but not for stencils.
We translate data of the shapes of our drawing and intend to use Access as "dictionary".
Yacine

d310gece

OK, I will try to explain what I am up to, I have wiring diagrams which I am trying to make multi language. So make Excel table with labels ID, English and French and write the values of text boxes. After that I use command buttons which run VBA to select all shapes in all sheets and apply them different data graphic. One button for English and another for French. I made two data graphics, one to display English and another French.  This is my solution.
The only problem is when I change all the font sizes and pharagraphing stuff and press the button, data graphic returns everything back. I wonder how to change that, so that data graphic wont change formating part of text callouts. I was looking in shape sheet of data graphic and callout, but my knowledge is not enough to solve it.

Yacine

#10
Ah a frenchman!
Si je te comprend bien, ce n'est pas la traduction de stencil que tu cherches, mais bien comme moi la traduction de colonnes de valeurs completes.
A ton encontre, nous utilisons une solution propre à nous sur laquelle nous avons le contrôle. Les data graphics sont une solution MS difficile à maitriser.
Mais nous pouvons tout de même essayer de t'aider.
A propos comment faites vous pour obtenir les traductions?
Yacine

d310gece

A French language was just an example :) I am from Lithuania :) so i had to use google translate to translate your post :)
I attached a print screen from my excel sheet. So I write english value in one column and lithuanian in other, then I link data with visio shapes, text boxes. So now I have both languages linked to shapes. Then I create two data graphics. Each data graphics show only values in one language. Then I add command buttons and write a VBA code.

Sub EN_Click()
 
Dim PagsObj As Visio.Pages
Dim PagObj As Visio.Page

Set PagsObj = ActiveDocument.Pages

' iterate through the collection of pages
For Each PagObj In PagsObj
ActiveWindow.Page = PagObj.Name

' Select all shapes
Application.ActiveWindow.SelectAll

' Apply the data graphic
Visio.ActiveWindow.Selection.DataGraphic = Visio.ActiveDocument.Masters("ENdata")
Next

' MsgBox "You have successfully selected English language"
End Sub

When I click button named EN, VBA selects all the shapes and apply them data graphic which show only English values. When I want different language I add another button to apply different data graphics.
If I need new language, I will add another column in excel and another command button with data graphic.

So far evertyhing is great. But as I mentioned, I can't find a way to manualy format text boxes, or should I say text callouts. Whenever I apply a data graphics it changes all formating. I would like to disable that function.

Yacine

Hi,
In the drawing explorer there is under Masters a "Text Callout" Master.
It's format defines the general appearance of the text callouts of the data graphics.
There are others too, related to other display options. Check it out.
Yacine

d310gece

Thanks for replying. I was trying to change that master the way I need for the last few days, but can't get the result I want. I even installed Visio2010 to use the CalloutTargetRef function, but it is not working as I was expexting. It's returning only #REF. So I gues there is something wrong with the shape or callout. I also tried to insert CalloutCount function in the ShapeSheet of the cell with callout attached but I am getting 0.0000   Can't understand why it is like this

Yacine

If you try to do everything in VBA, it will be difficult.
Do the very necessary part with code and the rest with settings in a template.
Setup your template, prepare one linking of data, so the according masters get visible, then adjust to your needs.
Yacine