As a developer who spent many years working within Visual C++ 6, I'm used to working with the String Table resource to store unicode strings for localization. Is there a resource within Visual Studio 2005 that provides the same? Are there any third party libraries or tools?
When compiler encounters such a string, it stores it in the program's string table and generates a pointer to the string. For this reason, the following program is correct and prints - one two three. #include<stdio.h> int main(void){ char*p = "one two three"; printf(p); return 0; } c.
A string table is a Windows resource that contains a list of IDs, values, and captions for all the strings of your application. For example, the status-bar prompts are located in the string table. While developing an application, you can have several string tables — one for each language or condition.
ResourceManager is your friend - and yes, Visual Studio still has support for it all in the editor. You might also want to read "Encoding and Localization". If you're really keen, I can thoroughly recommend Guy Smith-Ferrier's book on .NET i18n.
The short answer is "resources.resx" -- if you used a template for your new project, you probably have one already. Open it up, then drop down the "resource type" picker and select Strings. You can access them as (project namespace).Properties.Resources.(string name), though you may need to prepend a "global::" to that.
Of course, as Jon points out, for multi-language localization, you can access multiple resource files independently.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With