Localization using a resource file

I am using a * .resx file for localization purposes. A name is a phrase or word in English. Meaning - translation into another language of this phrase. I choose this approach to have one localization file for the entire application. And anyone who has this file can do the translation on their own.

But in the resx editor for Visual Studio 2010, every entry with a name that has spaces in it has a warning: "The resource name is not a valid identifier." Although it compiles and works, but please tell me that I am doing something wrong here.

+3
source share
3 answers

, resx , . , .

, Forms.en-GB.resx, Forms.pl-PL.resx, Forms.de-DE.resx, - ( ).

Visual Studio , / , . , , , ( ). , _ .

, - resx . ResXFileCodeGenerator " " resx ( ) " " " " resx, , .

+4

resx , , . resx, , . resx , . : - , localization.resx , . , , resx localization.fr-FR.resx. , , fr-FR, , - . - , , , , , , , .

, 1 resx , , .

+4

, , , .

; , .NET , .

, , , , , :

UserWelcome  Hey, {name}, thanks for dropping by ...

. , (, , , , , "", ).

, .

, , -, "" .

+1

Source: https://habr.com/ru/post/1796245/


All Articles