Developer forum

Forum » Feature requests » Translation.xml scope in Designs

Translation.xml scope in Designs

Nuno Aguiar
Reply

Hi,

 

I know we should have a new Dictionary very soon, but since I don't know anything about it, here's a feature request.

 

It would be nice if local translate tags where set in the module paragraph (within the specific design) and global would be set in the design root. It it makes it easier. creating a "design" scope could be an answer.

 

Let me know if this makes any sense and/or if the dictionary provides a better solution to this concept.

 

Best Regards,

Nuno


Replies

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer

Yes, a new Dictionary is part of the release of 8.5 due Tuesday.

It will not have "Global" and "Local" support anymore.

Translate keys are either in the root of a design (/Files/Templates/Designs/MyDesign/Translations.xml) and the keys are available in all templates running in the context of that design. Or you can have shared translate keys in the root of Designs (/Files/Templates/Designs/Translations.xml) that are shared among all designs on the solution.

This to keep thing simple. One design, one set of keys. One website using a design will have an interface to manage all keys directly from the tree.

See attached screendumps.

Translations1.JPG Translations2.JPG
Votes for this answer: 1
 
Nuno Aguiar
Reply

Perfect. Looking forward to see 8.5 as Last Stable Version :P

 
Martijn van Tongeren
Reply

Is it also possible to access the translation dictionary in code behind? And second question is it possible with 8.5 to auto generate a translation key in the translations.xml if a translation key doesn't exist in the translation file? 

 
Nicolai Høeg Pedersen
Reply

Hi Martijn

The API is not public at this time. I do have a task assigned to a dev to make it public and give it some easy to use methods.

It is not possible to autocreate the keys - only from the file or in the UI.

Nicolai

 
Peter Leleulya
Reply

It is not possible to auto create keys.

Isn't that a nice to have feature? (perhaps configurable with another checkbox in the back-end)
For developers that use Dynamicweb it's impossible to keep track of all the Translate tags you've added in all the different templates.

I'd suggest, when a key isn't available during rendering, add it to the designs (global) xml with the default value for all current languages.
Almost all the adds will be happening during the development fase, because you view your own progress ...

We often have (during development) our clients asking for a list of to be translated keys.
But we fail to deliver each time, because we don't have this (complete) list on hand.
 

Kind regards,

Peter.