Hi,
I cannot see that it is possible to create translations keys in the "Shared" directly from the templates.
Is that so or am I missing something?
Regards / Aki
Hi,
I cannot see that it is possible to create translations keys in the "Shared" directly from the templates.
Is that so or am I missing something?
Regards / Aki
Meaning that the key will create them selfes in the shared file?
Sorry for a little vague description. :)
I mean when you use the @Translate("My string") tag.
Is it possible to get that translate key into the "Shared" section in Translation intead of the current designs (In this case "Rapido").
Regards / Aki
Hi Aki
I do not thnink that is possible. Just looking at the API and the code...
BR Nicolai
Alright. Thanks anyway.
Back in the day you could do something like this <!--@Translate(mykey, "Stuff", global)-->
In a Rapido enviroment I would like have have my custom translations separated from the Rapido translations.
/Aki
Would there perhaps be some Ninja tricks hidden in the API to able to separate Rapido translations from other translations?
Regards / Aki
You might be able to have some fun using the Dynamicweb.Rendering.Translation.Translation class.
Alright. I'll check it out. Thanks.
/Aki
I saw that in Dynamicweb.dll 9.9 there is a Translation.GetTranslation(String, CultureInfo, KeyScope, Design). Looks like it's what I am looking for.
https://doc.dynamicweb.com/api/html/c4e5ee91-1169-fb71-193e-5bda11da47c3.htm
Nicolai, is there any possibility the get a hold of that DLL. It's for a project that wont be released until after DW 9.9 but I would be nice to able to work on that before the 9.9 release.
Regards / Aki
You have to wait. The dynamicweb.dll source code has been converted from vb to c# and this change cannot be merged - as it is also having other dependencies.
Works fine!
public static string GetTranslationFromDesign(string key, string designPath) { var pathToTranslation = HttpContext.Current.Server.MapPath(designPath); var design = new Dynamicweb.Rendering.Designer.Design(new DirectoryInfo(pathToTranslation)); return Dynamicweb.Rendering.Translation.Translation.GetTranslation(key, design); }
You must be logged in to post in the forum