Jump to content

Recommended Posts

Posted

Hi guys,

I've just had this wonderful idea : I know that multi-language field (example : $page->myfield) are useful whatever the page. I mean you can define a multi-language field in your homepage and make use of that same field in another page and benefit of the different translations there too.

Is it the same for translatable string (such as echo __("blablabla")) ? Am I able to translate some strings in one template and benefit of those translated strings in another template ?

Thanks

Posted

Thanks @Sérgio, I should have read more attentively that part, I didn't know those textdomain where the thing I was looking for.

The doc wasn't crystal clear for me, but this post made me understand the way to do it :

 

  • Like 1
Posted

I am not a big ML user, but I ended up with a Table field on the home page for sitewide translations. I use a 'name' field for the first column and a textAreaMultilanguage for the second column. This makes it really easy to add new strings and edit via the admin. I wrap the Table field in a fieldsetTab called "Sitewide Translations" to keep it separate from the main content.

  • Like 4

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...