sonata-project / SonataSeoBundle

Symfony SonataSeoBundle
https://docs.sonata-project.org/projects/SonataSeoBundle
MIT License
136 stars 90 forks source link

multilanguage support? #43

Closed dbu closed 4 years ago

dbu commented 10 years ago

in https://github.com/ElectricMaxxx/CmfSeoBundle/issues/26 we are wondering how the sonata seo bundle does multilanguage on things like the default site title, description or the keywords.

/cc @ElectricMaxxx

ElectricMaxxx commented 10 years ago

I think, we can just add a layer in sonatas seo config for the metas:

sonata_seo:
    title: Default title
    page:
        names:
              en:
                  description: Descriptin in en
                  keywords: Keys, english
              de:
                  description: Beschreibung in deutsch
                  keywords: Schlüssenwörter, deutsh

cause sonata just mapp everything under names in an array (i hope i am right with that depth). The only thing we need to care is to correct the structure in the SeoContentListener cause sonata will render only this structure into the meta tags:

...
        names:
               description: Descriptin in en
               keywords: Keys, english

But we would cause a realy problem for users which use that config without our SeoBundle. But i don't realy know what we can do with the title. @rande ? I would thing to put this title language agnostic in our config. Then the SeoContentListener can chose the right and put it to sonatas `PageService.

rande commented 10 years ago

We don't handle multilanguage. I don't think the bundle should care about it.

The default configuration is just here to set default values, like facebook app id and other values.

With SonataPageBundle the Site instance contains Seo information, so on each request we update the SeoPage instance: https://github.com/sonata-project/SonataPageBundle/blob/master/Site/BaseSiteSelector.php#L93-L105

ElectricMaxxx commented 10 years ago

@dbu that sounds for that i should redo our cmf-seo defaults as i had it with integrating a multilang behavior as in the SimplePageBundle (the one with the yml import of the content). And finaly i would feed SeoPage Service with language agnostic values. What would mean: default values with cmf-seo should be set in cmf-seo config only.

rande commented 10 years ago

might be a stupid question, but why not using the SonataPageBundle to create the SimplePageBundle ? look like you are reproducing the same piece of code.

ElectricMaxxx commented 10 years ago

Cause the seoHandling shouldn't be provided for CmsPageBundle only. It's based on an interface which can be mapped to "every document". If there are sonatas twig helpers somewhere in the template it will work. I just used the CmsPageBundle's page definitions as an example for defining mulitlang properties in a config.

asennoussi commented 8 years ago

Any news about this ?

ElectricMaxxx commented 8 years ago

Using the CMF and PHPCR the CmfSeoBundle would do that for you.

Am 23.11.2015 um 22:26 schrieb Aymane:

Any news about this ?


Reply to this email directly or view it on GitHub: https://github.com/sonata-project/SonataSeoBundle/issues/43#issuecomment-159069555

stale[bot] commented 4 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

apuzanoff commented 3 years ago

I still do not understand if there is support for multilanguage in sonata-project/SonataSeoBundle Or olny way to have multilanguage support is using symfony-cmf/seo-bundle which is unsupported for years ?