Coder Social home page Coder Social logo

Comments (5)

hubyhuby avatar hubyhuby commented on July 28, 2024

I plan to use translation later with buffalo, and this type of urls is compulsory for SEO.
Other url type that google like aswell are fr.gobuffalo.io, es.gobuffalo.io ...
Related question: Could this mechanisme of subfolder language be automated in a way with the buffalo generator ? As it is a standard url scheme for websites.

from docs.

stanislas-m avatar stanislas-m commented on July 28, 2024

@hubyhuby I plan to change the i18n middleware a bit, to allow customized extractors for the language:

  • Cookie
  • Session
  • URL param, maybe (?lang=en)
  • URL prefix (/en/, /fr/)
  • subdomains (en.domain.io, fr.domain.io)
  • Custom extractor using an interface?

I'd like to have a way to set priority for extractors too (first session, then cookie, and so on). Keeping the same default as now should be enough to keep back-compatibility.

from docs.

hubyhuby avatar hubyhuby commented on July 28, 2024

Hi @stanislas-m ,
I have not experienced for now the i18n feature in Buffalo.
On a SEO perspective what I have read is that the best practices in order are :
-Have several top domains : gobuffalo.fr gobuffalo.de ...
-Have subdomain like this fr.gobuffalo.io de.gobuffalo.fr ....
-Have a subfolder gobuffalo.io/fr gobuffalo.io/de

As I understand the "?lang=en" is not something search engines like. As of today...

My personal experience with the last website launch 4 motnhs ago, is that subdomains like "en.gobuffalo.io" works well in google. If I am in spain and try to reach my french website it will show on google "en.gobuffalo.io" (and not "gobuffalo.io" ) in first page. (I don t have a spanish website so it defaults to EN)

Conerning your technical question, as I didn t used it yet, I don t have a vlue ;)

from docs.

stanislas-m avatar stanislas-m commented on July 28, 2024

@hubyhuby I've reworked the i18n middleware a bit here: gobuffalo/buffalo#957 (and here is the way to use the new URL prefix language finder: https://github.com/gobuffalo/buffalo/blob/ef75e1dfa8c2bec86ad07aea7ca2f5b2feb5acca/middleware/i18n/i18n_test.go#L33)

It should allow to manage the subfolder way, and make the language finding easier to extend. I'm not sure Buffalo allows to run multiple domains / subdomains from now, but if not you can ask for this feature in the Buffalo repo. :)

from docs.

stanislas-m avatar stanislas-m commented on July 28, 2024

Since this specific point is resolved, I close this issue. @hubyhuby if you want a support for subdomains, please add an issue in the buffalo repo. :)

from docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.