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.

View pricing

VBOrderForm.vbExtractSub OnSave() SaveOrder() RefreshList() statusLabel.Text = "Order saved"My.Resources.UI.str_Order_savedEnd SubRESXUI.resxName Valuestr_Order_saved Order savedOrder savedstr_Order_saved VBOrderForm.vbExtractSub OnSave() SaveOrder() RefreshList() statusLabel.Text = "Order saved"My.Resources.UI.str_Order_savedEnd SubRESXUI.resxName Valuestr_Order_saved Order savedOrder savedstr_Order_saved
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.

Lingobit ExtractorScanScanStringSourceState"Order saved"OrderDlg.cpp:42NewExtract"%d"OrderDlg.cpp:57Newfiltered out: no letters"OrderWindow"OrderDlg.cpp:12NewSkip"SELECT * FROM Orders"OrderDb.cpp:30NewSkip"Print the order"OrderDlg.cpp:88NewExtract"Software\\MyApp"Settings.cpp:9NewSkip"Gift wrap"OrderDlg.cpp:95NewAt the next Scan, skipped strings stay skipped and extracted ones stay in the resources:only the new string is New. Lingobit ExtractorScanScanStringState"Order saved"NewExtract"%d"Newfiltered out: no letters"OrderWindow"NewSkip"SELECT * FROM Ord…"NewSkip"Print the order"NewExtract"Software\\MyApp"NewSkip"Gift wrap"NewAt the next Scan only the new stringis New; skipped ones stay skipped.
  1. Create a projectAdd your .vb files or the project folder. Generated files are left out.

  2. Add the .resxUse the project's .resx, or create one in Visual Studio (Project Properties > Resources) or in Extractor.

  3. Scan, then Skip or ExtractSkip the technical strings, extract the text with the My.Resources template.

  4. Save the .resx in Visual StudioSaving it regenerates My.Resources with the new properties.

  5. 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.

Pseudo TranslateRun Localized ApplicationNew OrderNew ÖrderNeCustomer:Cüßtömer:CüQuantity:Qüäntity:QüShip todayShip tödäyShiPrint receiptPrint receiptPriCreateCreäteCCancelCäncelCOrder savedÖrder ßävedÖrdFrom the resourcesWorks as the original Pseudo TranslateRun Localized ApplicationNew OrderNew ÖrderNeCustomer:Cüßtömer:CüQuantity:Qüäntity:QüShip todayShip tödäyShiPrint receiptPrint receiptPriCreateCreäteCCancelCäncelCOrder savedÖrder ßävedÖrdFrom the resourcesWorks

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.

  • 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.