This project is read-only.

Localizer doesn't get Value from PO file

Topics: Customizing Orchard, Localization
Jun 17, 2013 at 3:18 PM
So i have this in my PO file ( it's a module PO file):


| msgid "YouTubeEmbeddedCode"

msgid "YouTubeEmbeddedCode"
msgstr "<iframe width="{1}" height="{2}" src="{0}" frameborder="0" allowfullscreen></iframe>"

Whenever I try to get this value in code with T("YouTubeEmbeddedCode") , it just returns YouTubeEmbeddedCode. However when I call T("YouTubeEmbeddedCode") in my view it will get the value.
Jun 17, 2013 at 4:53 PM
The line msgctxt "~/{PathToTheFileWhereTheResourceAppears}.{extension}" is important.

If you have one for your view .cshtml, duplicate it for your code file .cs.

I guess you pass parameters to your T("YouTubeEmbeddedCode", border, width, height)?
Sometimes, there is a problem with that kind of translation with arguments but try.