High-quality, high-efficiency multi-language software development (WEB/PC/MOBILE) that uses interfaces to constrain/Invoke different language resources

Source: Internet
Author: User

Accidentally turned out a few years ago to write a small program, the time to collate the information to share.

in order to give its own software to achieve multi-language features, and the development of the auxiliary tools: SE String Resource. This was developed at the time based on the framework of another IDE software abstraction, which was not very complex.

The following information according to the records at that time, inevitably mistakes, please forgive me.

SE String Resource is a practical tool to assist multi-language software development, which is designed to constrain the implementation of different language resources through the generation of interfaces, so that developers can invoke resources based on interfaces, while multilingual development is not only good for the control of language resources, but also saves time and effort.
In addition, it provides a variety of useful functions for developers to use, such as multi-project parallel editing, resource import, Excel Import and export, etc.

Implementation of multi-language resource constrained by interface

The resource implementation of each language is constrained by the build interface (Interface).
The developer obtains resources in code through the automatically generated language resource management classes and resource interfaces.

Access language resources through the auto-generated main class

The automatically generated main class obtains all currently available resource files and the resources that are being used before , because the resource consumer does not need to be concerned about the specific resources currently in use, because of the interface-based approach.

Based on the. Net own resource processing mechanism

Fully built on the. Net own resource processing mechanism, use RESX resource files to store resources, and easily accommodate existing programs and maintain backward compatibility.

also supports string invocation to get resources directly

It supports the traditional way of locating resources by string, and can be used to extend applications such as automatic resource binding of UI layer.

Export, import, Excel

Make your localization work hushed by making it easy for local people to translate and proofread.

Detailed Description:

Implementation of multi-language resource constrained by interface


When using traditional GetString or other equivalent methods, there is an uncontrolled risk of access to the resource text, especially in larger software engineering or team collaboration development, where all resource text acquisition is not guaranteed to be correct and usable. Confusion caused by multiple revisions to the resource file, such as spelling errors.

Based on our experience, using traditional resource text acquisition methods, only hundreds of resource strings can be disastrous, impossible to maintain, and cannot be inspected individually, adding additional and costly costs to the project.
Consider the following questions:

The developer is misspelled when he gets the resource.
When revising a resource file, the original resource file identity was modified and failed to synchronize to the entire program.
When revising a resource file, delete the original resource entry by mistake, or remove the entry that you mistakenly think is not in use but is still in place.
The use of a resource text is not known: whether it is in use, whether it is used in multiple places.
When language resources are added, it is difficult to ensure that all language resources are fully synchronized, especially when the number of resources is large and the number of revisions is high.

To ask questions in the longer the project participants, the more prominent, you need a reliable, controllable way to ensure the quality of the project.

The SE string Resource is intended to solve the above problems and is also the fundamental purpose of SE string Resource.

Access language resources through a management class (main Class)

In the main class, you get all available language resources through the Getlanguages () method, and the current property gets the resources that are currently in use. The way to get all available resources is to get the available resources through reflection, so the main class needs to be built once, and you can then extend your functionality on that basis without having to regenerate the main class code.

For resource users, you can access the language resources that are currently in use with the Language.current property, regardless of the specific language resources, or whether the language resources are available or not, or if there is a difference, and you need to worry about spelling errors when you get the resources. Because these are all done through the Ilanguage interface.
In addition, the GetString () method also allows you to specify resource names through strings, which is especially useful when implementing UI-level language resource binding.

Resource row replication

In SE String Resource, the copy-and-paste operation of a resource row does not simply replicate one or more rows of data, but rather identifies the culture information that is carried when copied, and automatically matches if the region information on the pasted target differs from the region information at the time of the copy.

For example, a project contains "Chinese", "English", "B" project contains "English", "French", then from a project to B project to copy the resource line, can automatically paste a project in the English language resources in the B project, the Chinese resources are ignored. Even if two items are in different order of region information, they can be automatically matched.

Real-time error checking

SE String Resource can determine real-time problems in resource entries, such as invalid names and name collisions.

In the error list, simply double-click the error entry, which is where you can navigate to the error row to make it easier for you to handle more resource rows.

With a specially designed inspection algorithm, even thousands of or more resource entries, the inspection speed is also efficient and fast.

Export, import, Excel

There's no doubt that exporting to Excel can hushed your localization efforts.

In a very traditional resource processing technology, developers are usually the INI format, XML format, and even the TXT format of resource files directly to the translator for translation. In this way, the developer cannot check to see if the name of the resource row has been mistakenly changed and whether the resource entry was mistakenly deleted because of the failure of the operation.

During the iteration of the project, the resource files are constantly revised and handed over to translators (such as new resource files when the version is upgraded), and in the process the translators will use the past translation results to increase the chances of damaging the resource entries.

While using Excel tables, in addition to facilitating the work of localization workers, it is more important to import their translation results, SE String Resource will check all resources for errors, and because the project resource usage is interface-based, if the resource entries are mistakenly deleted, after generating code, Your development environment, such as Visual Studio, will report errors directly to you when compiling your code.

Run-time

Main interface

The right side is the resource editing area, and different languages are displayed in parallel on a single line, or they can be interpreted as merging different Resx resource files, without having to edit a resource file and then open another resource file edit.

Find and replace

Implements an almost the same search and replace function as Visual Studio to facilitate the editing of resource files.

Specify the basic properties of the project

Excel Export/Import

When Excel is exported, the form is a table that is almost the same as the main software interface, including the resource Key, and the different resource entries, the translator directly adds a column in Excel and enters the resource entry in the new column without having to modify it on the original basis.

When you import Excel, the columns in Excel are automatically parsed, corresponding to the corresponding zone information, columns that cannot be resolved, and can be specified manually.

When the import is complete, the import results are automatically checked for validity.

Generate code

Supports C # and vb.net, which can generate relevant code at any time during the development process.

Generate results

Postscript:

At that time like mixed CNSW, do not know whether there is cnswer in the garden, affected by this, the year after the small tool, feel that may be a bit of value, did the Chinese and English website registered domain name hanging online, in the form of shared software to sell.

Although the miserable faint only sold two copies.

But these two sales have brought me a lot of joy, because my work has been recognized by others, this recognition I think is very positive, really.

In addition, these past experiences are constantly beating on some of my values, and I have been rethinking for a long time: issues such as the positioning and value of software products, and what is needed in a market like China. :)

Small ads

Bloggers are paying attention to the relevant senior positions in Nanjing

Jiangsu Telecom Technical Manager No. 10,000th, currently a foreign-funded company team Leader

Biography:http://121.40.198.87:8010/

Use. NET WinForm to develop a WYSIWYG IDE development environment that allows you to build your application without writing code directly:

Http://www.cnblogs.com/sheng_chao/p/4387249.html

Development of online customer service system using wpf+ ASP (one):

Http://www.cnblogs.com/sheng_chao/p/4548146.html

High-quality, high-efficiency multi-language software development (WEB/PC/MOBILE) that uses interfaces to constrain/Invoke different language resources

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.