dotnet / dotnet/vblang

"Language Pack" for VB keywords and class libraries

Open
#332 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
328
Forks
71
PR merge metrics
No merged PRs in 30d

Description

## Problem
Many people do not speak English. If they want to learn VB, they will be asked to learn Computer English first. But some of them don't have enough time to recite so many English words. So, how about give them the chance of programming in their mother-languages?

## Design
Introduce a localized VB code file type ( `*.vblc` ) and a project-level localization definition file type ( `EditorLocalizationConfig.vbld` ).

In `*.vblc` files, you can use aliases in `EditorLocalizationConfig.vbld` files optionally. The IntelliSense will provide code fixes to toggle aliases. `*.vblc` files will be transformed into regular `*.vb` files at design-time. Once the user save `*.vblc` or before build, the background code generator will generate new `*.vb` files.

In the `EditorLocalizationConfig.vbld`, you can specify alias for keywords, types and members by adding new xml nodes.
For example, if you want to define an alias for the "Dim" keyword with the Chinese word "变量", and translate "Console.WriteLine(String)" into Chinese "控制台.输出行", you can change the content of `EditorLocalizationConfig.vbld` to:
```xml



```
This change will affect all `*.vblc` files in the current project after you save the `EditorLocalizationConfig.vbld` file. The following file:

__Program.vblc__
```vb
Module Program
Sub Main(args As String())
变量 text = "Hello world!"
控制台.输出行(text)
End Sub
End Module
```
Will be transformed into:

__Program.vb__
```vb
Module Program
Sub Main(args As String())
Dim text = "Hello world!"
Console.WriteLine(text)
End Sub
End Module
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.