Lingobit Extractor · Visual Basic .NET
Extract hard-coded strings from Visual Basic .NET code into .resx resources.
A message written as "Order saved" in Visual Basic .NET stays in English in every language. Lingobit Extractor moves it into a .resx file and puts My.Resources in its place, so it is compiled into the assembly's resources and can be translated.
- Files
- .vb; *.Designer.vb and AssemblyInfo are left alone
- Resources
- .resx
- In the code
- My.Resources with the resource name
- Trial
- 30 days, a separate download
What Extractor changes in your VB.NET code.
One string, before and after. The name is made from the words of the text: str_ and the words joined with _.
Before: OrderForm.vb
Sub OnSave()
SaveOrder()
statusLabel.Text = "Order saved"
End Sub
After: OrderForm.vb
Sub OnSave()
SaveOrder()
statusLabel.Text = My.Resources.UI.str_Order_saved
End Sub
New in the resources: UI.resx
Name Value
str_Order_saved Order saved
From hard-coded text to resources in five steps.
Not every string is text: a class name, an SQL query, or a registry key stays in the code. You decide what moves, and Extractor remembers it.
Create a projectAdd your
.vbfiles or the project folder. Generated files are left out.Add the .resxUse the project's
.resx, or create one in Visual Studio (Project Properties > Resources) or in Extractor.Scan, then Skip or ExtractSkip the technical strings, extract the text with the
My.Resourcestemplate.Save the .resx in Visual StudioSaving it regenerates
My.Resourceswith the new properties.BuildBuild as usual. The strings are now in the assembly's resources.
The code that loads the string.
Each extracted string gets a replace template. Pick one per resource file or per string.
My.Resources.$(RESNAME).$(ID)
Reads the string from the strongly typed class Visual Studio generates for the.resx.
After extraction, open the .resx in Visual Studio and save it once, and the new properties appear in My.Resources.
Then translate the build.
Lingobit Localizer reads the resources from your compiled assembly, together with the forms, and writes a satellite assembly for each language. .NET Framework 4.8 and .NET 5–10.
Before translation, check the result with Pseudo Translate in Lingobit Localizer: if a text still stays in English, it is still in the code. Pseudo Translate: Professional and higher.
VB.NET string extraction FAQ
Why does My.Resources not show the new strings right after extraction?
Visual Studio generates the class. Open the .resx in Visual Studio and save it once, and the properties appear.
Does Extractor touch Designer files?
No. *.Designer.vb and AssemblyInfo are left out. Form text is already in the form's resources, and Lingobit Localizer translates it there.
Does it work with C# in the same solution?
Yes. Add the .cs files to the same Extractor project; C# uses the Properties template.
What happens to strings I skip?
They stay in the code and keep the Skip state. At the next Scan only new strings show up.
Try Extractor on your own VB.NET code.
The trial runs for 30 days with every function. In each resource file the first 50 extracted strings are written as they are; after that, some may end in _TRIAL.
Other languages
- Lingobit ExtractorAll languages, how to work with Extractor, and the check after extraction.
- C and C++Hard-coded strings in C and C++ code into an .rc string table.
- C#Hard-coded strings in C# code into .resx resources.
- DelphiHard-coded strings in Delphi code into a resourcestring unit.
- JavaHard-coded strings in Java code into .properties files.