开发者

How should I go about creating a multilingual text translation editor in VS 2010?

开发者 https://www.devze.com 2023-03-08 15:52 出处:网络
Feature explained below is available in Microsoft Dynamics AX (formerly known as Axapta), an ERP application.However, my question is related to Visual Studio 2010 and MVC 3 application. Please find my

Feature explained below is available in Microsoft Dynamics AX (formerly known as Axapta), an ERP application. However, my question is related to Visual Studio 2010 and MVC 3 application. Please find my questions after this feature explanation.

  1. Screenshot #1 shows a method wri开发者_StackOverflow社区tten in X++ (language used in Microsoft Dynamics AX) using the MorphX editor. If I select a text within double quotes and right-click on them, I will get the options as shown in the screenshot. This is true if the text begins with an @ character and is a valid id found in the label file.
  2. If I click on the option Lookup Properties/Methods, a tool tip will appear showing the actual text associated with the selected label id. Here in this case the label id is @SYS67 and its associated label text is Transaction date. Refer screenshot #2.
  3. If I click on the option Lookup Label/Text, the label editor will appear with the label id pre-filtered along with other languages of choice at the bottom section of the editor. I can change the translation text in different languages using the editor. Refer screenshot #3.
  4. In Dynamics AX, the label texts are stored in text files with label id and separated by a tab. Label ids always begin with @ symbol. Here in the example shown @SYS is the group prefix and the given number is a sequential index. Refer screenshot #4 that displays text found in an en-us label file.

I understand that this is similar to Resource editor in Visual Studio where the translation text are stored in .resx files for each language. I would like to do something similar for an ASP.NET MVC 3 application using SQL Server database as the data store for the translation text.

Here are my questions:

  1. What would I need to create in Visual Studio 2010 to achieve this functionality so I can invoke the translation editor in the IDE? Would that be a plugin or extension?

  2. Would a similar resource provider be possible to do in an ASP.NET MVC application, where I can just specify the label id within double quotes and have provider model fetch the data from database during runtime? Is the syntax Resources.MyResource.GetLabel("@SYS67"); the only available option in ASP.NET? Sorry, if the resources syntax is wrong.

  3. Are there any similar tool set (plugin/extension) already available for Visual Studio?

  4. I believe that one of the terms to do translation in ASP.NET application is making use of Resource Provider Model. Are there any other terms? I am interested to know the term of what I am trying to achieve so I can search on the web to read more about it.

Any inputs will be really appreciated.

Thanks in advance.

Screenshot #1:

How should I go about creating a multilingual text translation editor in VS 2010?

Screenshot #2:

How should I go about creating a multilingual text translation editor in VS 2010?

Screenshot #3:

How should I go about creating a multilingual text translation editor in VS 2010?

Screenshot #4:

How should I go about creating a multilingual text translation editor in VS 2010?


I'm going to jump in here and give you what I know. I apologize if it doesn't completely answer your question but I don't want to stray too far from what I am familiar with and thus give you bad advice.

From the way you describe your issue, it seems that you could use the resource files (RESX) for translations, the issue is more that you want to know how to edit them in a manner that is user friendly. Further, some users may want to edit the translations on the web.

To answer this part of your question, I would recommend that you look at this article:

http://blog.lavablast.com/post/2008/02/07/RESX-file-Web-Editor.aspx

The author seems to have a similar issue as you and the conclusion the author arrived at was similar to what you are thinking about. The source code is provided so you could get a head-start if you wanted to pursue this method.

If you are going to pursue rolling your own editor, I would suggest that you choose one interface and stick with it. Otherwise you will be increasing your development time on something that isn't your actual product. Since you want the web for some users, I would suggest you would stick with the web for everyone. However, if you really want to pursue an plugin for Visual Studio, I would recommend that you put as much code into a central business logic layer as possible so that your presentation layers don't take up much of your time.

As for currently-available options, I don't think any of the following are Visual Studio plugins, but they all do a good job at working with localization:

  • http://www.redpin.eu/index.html
  • http://www.lingobit.com/products/index.html
  • http://www.sdl.com/en/language-technology/products/software-localization/sdl-passolo.asp

If you want to learn more about the terminology and practices of localization, I would recommend the following site:

http://quickstarts.asp.net/QuickStartv20/aspnet/doc/localization/localization.aspx

If you want to store information in a database instead of a .resx file, here is a resource that will show you how to do it:

http://msdn.microsoft.com/en-us/library/aa905797.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消