Maintaining a dictionary of translatable strings for templating


(Birdg) #1

Hi,

 

How does Squiz provide support for internationalisation of templates (beyond nesting contextable assets as design areas) for commonly used strings?

 

Is there a way to have a language file that can be referenced by Design files and Paint Layouts?

 

Thanks,

 

Graham


(Bart Banda) #2

If it's only for design elements and not actual page content, I think context's is the way to go. But if you can explain a bit more around the requirements and use case and why contexts might not be ideal for you that would help.


(Birdg) #3

Hi Bart,

Thanks for your reply. We are using contexts in most places but there are strings in our Design file (which does not seem to be contextable) and we were trying to avoid having too many nested content design areas to keep performance up.


I wondered whether there was a way to store these strings in a central (contextable) place and then reference them from the Design file.


Any thoughts?


Thanks,


Graham


(Bart Banda) #4

Well, one thought would be to create a metadata schema with a bunch of text fields that will hold all your strings, apply it to your site asset or some other asset but make sure it's contextual as the site is, then reference metadata values that will hold your strings of content using %globals_asset_metadata_stringName:1234% in the parse file where ever you want to print it. 

 

Would that work?


(Birdg) #5

Hi,

 

Yes, that probably would work. Thanks for the reply. I wanted to make sure we hadn't missed some in-built functionality before we made something like that.

 

Thanks again,

 

Graham