Hi, I'm trying to use polyglot on a new website which use the grid layout, but i'm facing a problem. I just can't use the "Translated Property" macro as it is, since the grid must be rendered, how could I take the translated property and then render it?
I thought an easy way would be to use tabs for the translations, and then pass to GetGridHtml the different content depending on the selected language, how would i retrieve the right property alias for the currently selected language?
I am not very familiar with the grid layout so I am not sure that this will solve the problem, but how about trying to use PropertyReferenceTranslation? For an example you can have a look at the TranslatedNavigation source:
Well, I found that the easier and best way would be just to modify PropertyTranslation, using GetGridHtml to return the property value, now is just Umbraco.Web.GridTemplateExtensions.GetGridHtml that is giving me headaches!
Hmmm.... Sadly I am not familiar with this grid thing... But if there is anything else I can help you with, as far as Polyglot is concerned, let me know!
Usage with grids
Hi, I'm trying to use polyglot on a new website which use the grid layout, but i'm facing a problem. I just can't use the "Translated Property" macro as it is, since the grid must be rendered, how could I take the translated property and then render it?
I thought an easy way would be to use tabs for the translations, and then pass to GetGridHtml the different content depending on the selected language, how would i retrieve the right property alias for the currently selected language?
Hello,
I am not very familiar with the grid layout so I am not sure that this will solve the problem, but how about trying to use PropertyReferenceTranslation? For an example you can have a look at the TranslatedNavigation source:
https://github.com/dimitrikourk/Polyglot/blob/v2/Dimi.Polyglot/UmbracoRazorScripts/TranslatedNavigation.cshtml
Well, I found that the easier and best way would be just to modify PropertyTranslation, using GetGridHtml to return the property value, now is just Umbraco.Web.GridTemplateExtensions.GetGridHtml that is giving me headaches!
Hmmm.... Sadly I am not familiar with this grid thing... But if there is anything else I can help you with, as far as Polyglot is concerned, let me know!
I did it, here's the result, for anyone who will need:
@ * PropertyTranslationGetGrid.cshtml *@
@inherits umbraco.MacroEngines.DynamicNodeContext @using umbraco.MacroEngines; @{
}
The new parameter 'Framework' is for the grid renderer
is working on a reply...