Visio Guy

Visio Guy Website & General Stuff => User-submitted Stuff => Topic started by: Yacine on February 17, 2013, 11:24:41 AM

Title: Localisation
Post by: Yacine on February 17, 2013, 11:24:41 AM
All of you, who ever had to implement a complex software solution (Visio or other) were certainly concerned to avoid cul-de-sacs resulting from hard-coded values. The obvious way – even if more tedious – is to implement an additional layer, in which you implement one internal – and immutable – set of values and one external – visible to your users – that you can modify with small effort.
For Visio shapes I came up with the following solution, which I wanted to share with you.
The values of the shape data (in lists) need to reference to variable lists. These lists would reside either in the user-defined cells section if the shape is only to be modified by Visio experts, or in the shape data section, if your trust in your users is big enough. (These variable lists can easily be made with text editors or as in the enclosed example with excel.)
One major issue in this solution was to be able to remote control the shape without destroying its ability to react to users commands. A "SetF/GetRef" command from a user defined cell (user.ID_Ext) to the aimed shape data value (prop.fruit) did the job.
Extending that reflection, I added a shape in which you can switch the language of preference.
I'd enjoy your comments regarding better solutions, as this one blows up the shapesheet if you have more than one variable to handle.
Title: Re: Localisation
Post by: Yacine on February 17, 2013, 11:28:37 AM
The excel file...
Browser ID: smf (is_webkit)
Templates: 1: Printpage (default).
Sub templates: 4: init, print_above, main, print_below.
Language files: 1: index+Modifications.english (default).
Style sheets: 0: .
Hooks called: 48 (show)
Files included: 25 - 925KB. (show)
Memory used: 749KB.
Tokens: post-login.
Cache hits: 8: 0.00140s for 22,302 bytes (show)
Cache misses: 2: (show)
Queries used: 11.

[Show Queries]