2

Having rather large project using Resources for internationalization (following this guide: ASP.NET MVC 2 Localization complete guide, using things like data attributes, and so on) we run into the need of translating the resource files. In the beggining of project I selected approach to have lot of small resource files - for each view, viewmodel, controller, ... So I ended up having hundreds of resources. During the translations (which is done by our partners using ResXManager tool we run into trouble identifying the context of the string (where is it displayed, to find out the correct form of translation to make sense when displayed).

So I was asked to make the mutation of application which do not display the localized values, but the keys (or string names). E.g. having string in resources TBL_NAME used somewhere in the view like @ResX.TBL_NAME and translated into english as "Name", I would like to show it in this special mutation as "TBL_NAME", so the translator may see the context - where exactly this string is used. The best would be, if this is not special build of application, but rather the another "language" of the application available for translators, so he can switch between english and this "unlocalized" languages.

I'm looking some easy ideas of doing this. So far I was thinking of these approaches:

  1. Override ResourceManager.GetString - cannot use, because we use generated Designer classes to access strings massively and so far I haven't find a way to change created ResourceManager (see this answer). Did I miss something?
  2. Create resources for some unused language, which will contain pairs string name/translated value as TBL_NAME/TBL_NAME - viable, but very exhausting since we have hundreds of resources. Also the addition of new resource will require us to remeber that we need to add also this unused language resource will exact same strings name. You also have to do twice much work when adding single string to application.

At the moment, it seems for me, that using resources and current approach it is impossible to solve this task, so I decided to ask this as question (and I'm aware it is rather discussion than question) here, hoping, someone will give me some hint about other approach to solve this problem.

3
  • 1
    That's why I dislike resource files. It's possible to end up with all sorts of dependencies on them that are difficult or impossible to mock. This isn't extremely helpful because your resource files are already built, but I've used this library which takes a completely different approach. It even includes a configuration setting to return the resource key (which is the untranslated text) instead of a translation for debugging purposes. Or you could just add a few characters to the translation to test the effect on layout. Commented Jun 20, 2016 at 18:10
  • Are you looking only for solutions that you can code, or would you also consider buying software that allows translators to work in context? Commented Jun 21, 2016 at 12:22
  • @Jenszcz: both ways are possible. If you have some tip on good software for translations process, I would appreciate. I was looking for one during start of project, but didn't find any reasonable one. Commented Jun 21, 2016 at 14:38

1 Answer 1

1

My preferred option would be to give the translators an environment where they can see what they are translating. Rigi requires a bit of setup (basically you need to add an additional UI language), but once you have done that translators can work within the live website - or in a test instance, which is what we did.

They can also work in screenshots, which is convenient when translators would have to access admin or other role specific pages but you do not want to bother giving them all kinds of user rights. These screenshots can be generated as part of automated UI tests or during manual UI testing.

I am afraid I can't say anything about the cost of the solution, but our translators are really happy with it. I am not sure if this is what you are looking for since you asked for an easy solution, but it definitely solves the issue of giving translators the context they need to do their job - better than displaying resource IDs.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks @Jenszcz: It is not answer (question was different), but it seems absolutely be a solution to the problem, taking very different way. What I don't like is the mysteriozity on the linked page, and also your "I can't say anything about the cost..." - this is, at least, suspicious :-). But I will look at the page you linked to find out more.
@Zoka, I am in a technical position and have nothing to do with purchases, budgets, whatsoever: that's the reason why I can't say anything about cost. I think that the Rigi developers do not have a fixed price model in place.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.