The best place to *find* answers to programming/development questions, imo, however it's the *worst* place to *ask* questions (if your first question/comment doesn't get any up-rating/response, then u can't ask anymore questions--ridiculously unrealistic), but again, a great reference for *finding* answers.

My Music (Nickleus)


[SOLVED] what is the @T() method and where is it documented? razor? c# .net?

today i finally figured out what the "T method" is :)
it's a part of Orchard CMS and is used for localization (translating strings to other languages/locales):

@T("Price"): <b>$@Model.Price</b><br />

from the orchard article "Building the Templates":
This is very plain rendering of the shape. Notice the use of the T method call to wrap the "Price" string literal. This enables localization of that text.

from the orchard article "Localizing the Orchard Application and Orchard Modules":
All strings in the Orchard application are output through a single T() method that can look up a translated string based on the default site culture.

from the orchard article "How Orchard Works":
Localization of the application and its modules is done by wrapping string resources in a call to the T method: <%: T("This string can be localized") %>

No comments:

Post a Comment