VsTranslator icon indicating copy to clipboard operation
VsTranslator copied to clipboard

Automatically detect target language by the name of the folder or file

Open icnocop opened this issue 6 years ago • 2 comments

I would like VsTranslator to automatically detect the target language by the name of the folder or file.

For example, if my file is called "Localization.zh-CN.resx", then the target language should automatically be Chinese (Simplified) by default.

Also, if my file is in a folder containing "CHS", then the target language should automatically be Chinese (Simplified) by default.

In this way, I don't have to change the target language when translating strings in multiple files where each file targets a different language.

I could imagine this feature as a set of rules based on Regular Expressions that the user would have to enter.

For example, Target Language Identifier: zh-CN Regular Expression Matches: zh-CN CHS

The Regular Expression would match on the full path of the file.

Thank you.

icnocop avatar Dec 21 '18 02:12 icnocop

Or maybe just cache the target language based on the file path, so I only have to set the target language once per file.

icnocop avatar Apr 16 '20 22:04 icnocop

OK,I will consider this.

Kerwin1202 avatar Apr 18 '20 16:04 Kerwin1202