Forum: Multi-Language Add-In for Visual Studio

Handling 'include' files

Hi Phil,

In the ongoing saga of our tool evaluation, we have come up with another potential issue.

The way our app is constructed we have several files that are 'included' ('open as link' in visual studio parlance) into multiple components.

Some of these files contain strings that we need translated.

The issue comes about in terms of the resources. Currently, and please correct me if I am wrong, the translations for each of these include files would have to be copied into the translation resource file for each of the modules in which it is used. This is not, of itself, a huge issue. The trouble comes about in trying to synchronise the resource ID's in each project. Because the code is common, the resource ID's are also common. This could be managed at first, but will become problematic as the app matures and new translations are added.

For instance, I may add a new translation to an include file in component X which then gets ID = 123. But then I open component Y that also uses this include file but it already has a translation for a different string with that ID number.

Does your tool have any mechanism for handling this type of situation?

thanks

Darren

Germany

At present, I don't have a working solution, but I have a sort of a plan.

I think the way to go is to split the project database file up into two parts:

  • One part contains project specific information (e.g. which String ID is associated with which property)
  • The other part stores String IDs and translations.


The second part could optionally be shared between projects, so that String IDs are shared across all projects.

I have actually gone a long way towards implementing this logic. Internally, I have made this split and also defined abstract interfaces to each part. It should be technically fairly straight forward to make a new implementation of these interfaces using separate files. It would also be possible to move the part containing the translations into a separate database.

There was another posting about the problem of generating string IDs on a branch (in a version control system, such as SVN). This might also be the basis of a solution to that problem.

I don't have a timetable for this work at present, but it is in the back of my mind.

Phil