gantry / gantry5

:rocket: Next Generation Template / Theme Framework
http://gantry.org
1.03k stars 205 forks source link

Multi-language implementations for particles #84

Open humblehumanbeing opened 9 years ago

humblehumanbeing commented 9 years ago

We were duplicating the template for each language in G4 to overcome the following issue and currently (as in G4) the particles copyright, branding, and even social will need multiple instances in a multi-language installation since manual input is necessary for each language. That means we will need to have the copies of these types of particles besides the copies of a layout. That means a lot of work. Do you have any plans on that?

mahagr commented 9 years ago

We are still thinking of the best ways to handle multi-language in our menu manager as well as for particles (both of them are user entered content).

We have some competing ideas, but maybe you can share yours as well?

In G5 you do not need to duplicate template as everything that is visible in the page will be handled via configurations (or Joomla template styles). So its already improvement to Gantry4 on this regard, but hardly optimal.

What I was thinking was to have language variations on each configuration (and menus), but I'm still debating on some of the details.

Omegatcu commented 9 years ago

hmmm please keep in mind that a lot of us use 3rd party Components as well (jomFish, Falang, Josetta) so it would be very cool if we can have something like a connector to use these...

robwent commented 9 years ago

What about the standard option of being able to assign the template to a language as the default template. Has that been removed for a reason? Then you just need a default template for each language rather than having to assign one to all the pages of a language. I think falang works with language assigned templates as well.

mahagr commented 9 years ago

It's not removed, really, but on the other hand it's not enabled yet, either.

Initially we could just implement languages by setting default template for the language, but to be honest, I'm really not fan of the feature. Copying the content and having no good way to compare it against other languages will make the feature hard to work with -- I think that everyone who has created a Joomla site in multi-language can agree with me on that.

robwent commented 9 years ago

You mean set one template as default and then have translation options within the template admin?

That would be pretty good.

The only thing worse than having to set a default template for each language is not being able to :)

w00fz commented 9 years ago

Hey all, just an update on our (not so) recent discussions regarding the language. This is by no means definitive nor in the works as of now, just a concept with mockup that I want to keep in the records on this issue so it doesn't get lost with the other million things we have to work on.

The idea is to have a dedicated language editor where all the particles load with the fields that have been marked as 'translatable' in the blueprints or even just in the yaml and everything is pretty much plain value. For instance if there are dropdowns we dont render them as dropdowns but we just list the values of the dropdowns as text fields.

lang-mockup

This would be for the general language, so basically anything that can be translated would show up in there. You will be able to switch language from the dropdown up there and reloads the fields with the language. Anytime you see a blank field it means it hasn't been translated.

Alternative, you would be able to also switch the individual card language. We could even have a bar that tells the progress of a translation based on how many empty ones there are (ie, if i switch to italian it might say 80% completed).

Finally, we would also have a way to select individual layouts and display the particles associated to that layout.

The loop arrow icon next to each label would be a shortcut for comparing. Clicking the icon would open a modal where you can compare 2 languages, side-by-side. Left | Right comparison.

We would also have it generic to the card, so imagine the same loop icon next to Sample Content card title in the screenshot above. Clicking it would open a modal with the same card rendered twice, next to each other and on the left english, on the right italian. You will be able to switch between languages individually.

Because this will be its own dedicated Language section, we would be able to have a way to filter based on Untranslated and more. So if that was active it would only show empty text fields, letting you know at a glance what's not been translated still.

This is my personal concept that I have had in my mind and that I proposed to the rest of the team. If you guys have any thoughts please share!


@alisamii on the Gitter chat has also posted some useful links that we could get inspiration from:

newkind commented 9 years ago

I'm not sure if separate page is something necessary. In my opinion this is just another step to find the things that should be under your finger tips. Maybe we should just integrate the Language dropdown in the particle settings - right where you type your content ? Switching language would swap what's in the content inputs with translated text or empty fields if there's no translation.

alisamii commented 9 years ago

@newkind The advantage of having a "translations manager" is that you can see, at a glance, the original text, as well as the target texts. It helps ensure that the translations are accurate.

Also, if a system is created like that of https://github.com/lexik/LexikTranslationBundle then you can have a global view of all languages at the same time, and ensure you haven't missed something.

Finally, a single view per particle or layout or whatever would make it much simpler to quickly complete all translations, especially in an environment where a site may have 5 or more languages.

joomlagate commented 8 years ago

Hope you will implement this "multi-language support" soon. Gantry 5 has released several stable versions but the User Interface can not be translated, this is a big barrier for non-English speakers!

knro commented 8 years ago

Is there any progress on this issue or ETA? I only have ONE particle to translate so it is seems that duplicating the the theme is an overkill. I hope translation of particles is supported soon!

Omegatcu commented 8 years ago

@knro duplicate the particle :)

@w00fz just make us aware of current plans of the team on this. If we know nothing is comming maybe the community will bring a solution to the table. but right now i wait what you guys plan on doing so i don't do a lot of work for nothing.

mahagr commented 8 years ago

Right now our main goal is to finish Grav implementation with positions support and after that implement layout inheritance. After that maybe :)

JoomFX commented 8 years ago

...and after that implement layout inheritance.

Oh boy, can't wait for this, honestly! In my opinion this is the ONLY major feature that is missing in G5 :wink:

JoomFX commented 8 years ago

@w00fz @mahagr Guys, I just realized how important this is! Here's my whole story...

I'm working on a new template which is for such websites/businesses where multilingual (language switcher) is a "must have" feature. I've always been saying "use the core Joomla features instead of 3rd party extension", but today, for a first time in my life, I installed Falang. I did so as it is the most popular 3rd party translation extension, as it is much easier for me to build the demo with it rather than duplicating everything (the Joomla way) and it comes with a better "Language Switcher" module. If I have to be honest I'm quite impressed how much easier it is to build a multilingual website with it instead of the default Joomla way. And looking at the Falang Reviews on JED tells me that I'm not the only impressed person. So, I spent the whole day just in styling the "Language Switcher" and just then I realized that I'm screwed up - my templates are entirely build with particles and guess what - Falang (and any other 3rd party tool) cannot translate them :smile:

So, here comes the topic for "Multi-language implementations for particles". I really like what Djamil offered, a dedicated Language Manager for particles. All these features sound great but it must be thought out in details. For example, how exactly the particle content will be translated, I mean the one presented on the frontend (I don't really care about translating the backend).

I also like the simple approach offered by @newkind . If I have to be honest, I don't know which one I personally prefer. The first one looks really powerful while the second one sound very user friendly and intuitive.

Anyway guys, where are we at with this, do you have a plan already, I mean have you come up with the clear idea that will be implemented? :smile:

P.S. Any chance of contacting the Falang Team and working with them in implementing the particle translation feature in the extension? I guess not, but I have to ask since it really is the most popular translation extension :wink: Hmmm, but I guess it is not that simple to translate the particles with a tool outside of Gantry 5... the content is not stored in the database.

mahagr commented 8 years ago

Unfortunately there's not much I can say at this point except that I'm fully aware of this and this is among 3 most important features which are missing to make Gantry really powerful tool. I'm hoping to implement this right after we get 5.3 out.

sbouey commented 8 years ago

Hi,

I'm Stéphane from Falang, Thanks a lot @JoomFX for you nice comment. Yes Falang is probably in most case the easier way to translate a Joomla site.

I wil have a look at this Template and the Particles translation.

Stéphane

JoomFX commented 8 years ago

Hey @sbouey ,

Nice to meet you mate :wink: It will be awesome if you can add the "Gantry 5 Particle Translation" feature to Falang. That's how both parties will benefit a lot. Thanks a lot for looking in to it!

sbouey commented 8 years ago

I'm not very Famillar wth the gantry Framework. Where i can ask question ? in this thread ?

Stéphane

JoomFX commented 8 years ago

@sbouey You can ask all kind of questions in the Gitter chatroom or I guess it will be best to open a new Github issue specifically for the Gantry5/Falang implementation. Just mention there that you are from the Falang team and you work on implementing Particle translation feature and the main G5 developers ( @mahagr and @w00fz ) will assist you will all kind of questions :wink:

JoomFX commented 8 years ago

@sbouey Sorry, forgot to mention @newkind in the main G5 developers :wink: He is the WP guru!

mahagr commented 8 years ago

Translating particles is a bit tricky without making changes to Gantry, but I already have pretty good idea on how to do that.

alisamii commented 8 years ago

Where do we stand on Translations? It's a really important feature for multilingual sites, and I hope that it is in the cards immediately after grav integration has been completed.

mahagr commented 8 years ago

There are 2 questions that come up all the time: frontend editing and multi-language sites. Those will be the next top priority features, though missing frontend editing seems to be deal breaker for more people than multi-language features.

jameswadsworth commented 8 years ago

Multi-language implementation, that works nicely with Falang gets my vote. In particular the menus which 1) do not sync between the joomla menu manager and the gantry template manager 2) if the menu alias is translated using falang, then the menu breaks (order breaks down, incorrect language shows in menu) unless all the menu aliases are put back into the original language, at which point it all works correctly again.

We are currently working a project for client that currently has a site using a Gantry 4 template and Falang (all works perfectly) and they want to migrate a whole chunk of their site to a new domain, for which we had planned to use Gantry5 and Interstellar. They already have an extensive menu structure and we do NOT want to put all the menu aliases back into their original language. This is a deal breaker.

w00fz commented 8 years ago

It's on our list. We will get there.

jameswadsworth commented 8 years ago

We have found a solution to the translation of the menu item alias. We can translate the menu item alias using falang and the menu displays correctly if the following system plugins are this order: 1) System - Gantry 5 2) System - Language Filter 3) System - Falang Database driver We have also found this if you change the menu item ordering and it is not showing up in the frontend then you need to delete the folder /templates/gantry5template/custom/config/menu

sbouey commented 8 years ago

Hi,

Thanks for the mail, i have mount a test system with gantry to have a look on particles.

For the last problem on ordering of menu , i have alreday see you have to delete /templates/gantry5template/custom/config/menu where a yaml file is put. I can't do Nothing in falang because it's work only with database override. Do you think there is a way if falang plugin driver is enabled to not read this folder ?

Stéphane

mahagr commented 8 years ago

I've been looking into finding way to store all the menu content into Joomla database, but currently a broken menu save event prevents me from doing that. The event uses array instead of object and doesn't use reference making it impossible to modify the data before saving.

jameswadsworth commented 8 years ago

Hi @mahagr do you know if there a bug open for the issue you mention?

mahagr commented 8 years ago

@jameswadsworth No, I was going to look into it when something else came up. And I've totally forgot what the event was since then. I think I have the code in place (somewhere) so I could quickly test it, let me see..

sbouey commented 8 years ago

Hi,

To complete this , i will lauch a new falang version who put the language filter in a order before falang database driver. You are sure system gantry must be set before language filter ?

Stéphane

mahagr commented 8 years ago

I don't think System - Gantry 5 needs to come first. It only hooks into onAfterRoute event in frontend.

jameswadsworth commented 8 years ago

Hi @mahagr and @sbouey, we'll check on our test server and let you know what works.

jameswadsworth commented 8 years ago

It is NOT necessary to put the System - Gantry 5 plugin before the System - Falang Database driver. It doesn't change anything if either one is before the other. It is the deletion of the mainmenu.yaml file under /templates/mygantry5template/custom/config/menu which makes the difference. I presume if the file is not present Gantry 5 renders the menu using the core Joomla settings?

mahagr commented 8 years ago

File will only be present if you save menu inside Gantry. As long as you don't do that, Falang should work just fine.

jameswadsworth commented 8 years ago

Exactly.

Vanguger commented 7 years ago

It would be nice to make this option edit translate trn

w00fz commented 7 years ago

We already had a lengthy discussion and we are going to implement multi language in the future.

Please see:

mahagr commented 7 years ago

I've added initial support for translating most of admin (form field labels and descriptions); If you enable language debug for Joomla, you will get most keys out...

The feature is still experimental, but seems to work. If there are conflicting keys or different parts of admin using different keys for the same file, please let me know.

alisamii commented 7 years ago

Any progress on the multilingual feature?

I really need to find a simple and easy way to handle multilingual sites. Most of my clients are in the French section of Switzerland and at the very least, every site has to be in French and English, and most need to be in German and Italian as well.

jameswadsworth commented 7 years ago

We are regularly translating websites with gantry using falang. In the past to translate modules we had to create new module instances for each language (as per the recommended Joomla way). After some recent updates it is also possible to translate gantry modules with falang. If you want to see a website we are currently developing which uses this system see www.weloveteachingenglish.com

[image: Contact De Anima Consulting] http://www.deanimaconsulting.com/ James Wadsworth +44 113 815 4766 (office UK) +44 7989 305 288 (mobile UK)

On 1 February 2017 at 11:52, Ali Samii notifications@github.com wrote:

Any progress on the multilingual feature?

I really need to find a simple and easy way to handle multilingual sites. Most of my clients are in the French section of Switzerland and at the very least, every site has to be in French and English, and most need to be in German and Italian as well.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gantry/gantry5/issues/84#issuecomment-276628032, or mute the thread https://github.com/notifications/unsubscribe-auth/AIxdFafDp4yQTmTOO6XIMqqk6jR1YsY7ks5rYGPmgaJpZM4EAPQx .

mahagr commented 7 years ago

How do the falang translations work in Gantry?

jameswadsworth commented 7 years ago

For gantry particles Falang renders the particle within the translation field parameters and then stores the translated particle in the #__falang_content table under the field value (as opposed to saving it as a file). We have tried this with various different particles such as owl carousel, simple content, pricing table, block content. I've not delved too deeply. It is working which is the main thing. Below is a screenshot of falang in action with a gantry pricing table particle falang_translation_pricing_table

mahagr commented 7 years ago

Interesting. Does this work for modules only or for all particles (including the ones in the layout)?

sbouey commented 7 years ago

Hi,

How can i help you ? This version working with Falang is available on Github ?

Stéphane

De: "James Wadsworth" notifications@github.com À: "gantry" gantry5@noreply.github.com Cc: "Faboba" stephane.bouey@faboba.com, "Mention" mention@noreply.github.com Envoyé: Jeudi 2 Février 2017 18:49:09 Objet: Re: [gantry/gantry5] Multi-language implementations for particles (#84)

For gantry particles Falang renders the particle within the translation field parameters and then stores the translated particle in the #__falang_content table under the field value (as opposed to saving it as a file). We have tried this with various different particles such as owl carousel, simple content, pricing table, block content. I've not delved too deeply. It is working which is the main thing. Below is a screenshot of falang in action with a gantry pricing table particle [ https://cloud.githubusercontent.com/assets/9198869/22561347/827b4894-e980-11e6-817f-5f344f836aa3.png ]

— You are receiving this because you were mentioned. Reply to this email directly, [ https://github.com/gantry/gantry5/issues/84#issuecomment-277030260 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/AKtMZK_FfqtsHJhcoX1-vJ1k3Vy2ZL7rks5rYhcUgaJpZM4EAPQx | mute the thread ] .

jameswadsworth commented 7 years ago

Hi Stéphane,

this is working with falang 2.7.0 without any modifications and the latest version of gantry 5.4.6.

@mahagr - Falang doesn't work directly on layouts. @sbouey - could the translation of layouts be done with falang?

Kind regards, James

[image: Contact De Anima Consulting] http://www.deanimaconsulting.com/ James Wadsworth +44 113 815 4766 (office UK) +44 7989 305 288 (mobile UK)

On 3 February 2017 at 13:31, sbouey notifications@github.com wrote:

Hi,

How can i help you ? This version working with Falang is available on Github ?

Stéphane

De: "James Wadsworth" notifications@github.com À: "gantry" gantry5@noreply.github.com Cc: "Faboba" stephane.bouey@faboba.com, "Mention" < mention@noreply.github.com> Envoyé: Jeudi 2 Février 2017 18:49:09 Objet: Re: [gantry/gantry5] Multi-language implementations for particles (#84)

For gantry particles Falang renders the particle within the translation field parameters and then stores the translated particle in the

__falang_content table under the field value (as opposed to saving it as a

file). We have tried this with various different particles such as owl carousel, simple content, pricing table, block content. I've not delved too deeply. It is working which is the main thing. Below is a screenshot of falang in action with a gantry pricing table particle [ https://cloud.githubusercontent.com/assets/9198869/22561347/827b4894- e980-11e6-817f-5f344f836aa3.png ]

— You are receiving this because you were mentioned. Reply to this email directly, [ https://github.com/gantry/ gantry5/issues/84#issuecomment-277030260 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/AKtMZK_FfqtsHJhcoX1- vJ1k3Vy2ZL7rks5rYhcUgaJpZM4EAPQx | mute the thread ] .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gantry/gantry5/issues/84#issuecomment-277236346, or mute the thread https://github.com/notifications/unsubscribe-auth/AIxdFQ4cy1CEnqw85i8yRBUZAIk0P4Ykks5rYx4WgaJpZM4EAPQx .

mahagr commented 7 years ago

I could add an event before displaying particle in a form and before it gets rendered in the frontend.

coolman01 commented 7 years ago

Hi Has there been any progress on the multilingual for particles issue? I'm using simple list and have 7 languages on a site - I'm using standard Joomla multilingual setup NOT Falang - and having a simple list menu is a great solution, but I have no idea how make them multilingual. Is there a way by using the joomla built in Associations? Open to any and all ideas. Regards David

mahagr commented 7 years ago

Right now I'm working on another project, which means that there hasn't been much progress on multilingual support (just some minor fixes here and there).

Using Joomla associations helps mostly when you switch the language -- allowing you to get to the same page in another language.

If you have a simple list as a particle, you can make it multilingual by using module position instead and adding particle as a module for each supported language.

coolman01 commented 7 years ago

Hi Matias Thanks for the feedback and suggestions. Yes, using a particle as a module looks like the way to go currently. Regards David