MVC.NET add extra parameter to resx (localisation)
Hi I'm creating a MVC project, with localisation. The project also consists of a small quiz
The questio开发者_StackOverflow社区ns and answers are in a localisation file (resx), but I need to add points to the answers.
Is there an easy way to add (map) an extra parameter (points) to the translated content?
You could put string formatter tokens into the text in your resource files. So your text would be:
Question10 | "This question is worth {0} points."
Then in your code you could do:
string.Format(Resources.QuizQuestions.Question10, 15);
精彩评论