Coder Social home page Coder Social logo

Comments (5)

jessuppi avatar jessuppi commented on July 29, 2024

@Bronislawsky It is something that I've thought about since the beginning, however I'm not sure what the best approach would be. Obviously yes, including every single common URI slug in dozens of languages by default would not be very manageable.

So yah, probably it would need a variable in ss-config for custom slugs to skip cache.

That said, I'd also love to be able to popularize certain URIs (spellings) for commonality/SEO... I'm not a fan of needlessly complex slugs like shopping-cart instead of just cart etc.

from slickstack.

backamblock avatar backamblock commented on July 29, 2024

suggestion:
ask about language in the installer script and link it to a file in your repository. everybody who needs a language should contribute the file with the correct translations.
Workaround for not yet accepted contributions: set own URL or path to language files in the ss-config

example file: "de_DE.txt"

cart="warenkorb"
account="mein-konto"
checkout="checkout"
contact="kontakt"
.....

this is just an example, i don't have the correct slugs in my head right now.

another, easier, way would be to set the initial exclusions in english, then get the current values of woocommerce on each ss-update.
this way the user would not need to install everything a second time after reading his config and writing the file.
but i guess this would involve more coding

from slickstack.

backamblock avatar backamblock commented on July 29, 2024

In french, we use panier instead of cart etc,

Is it a possibility to eventually add multilang support or a custom skip cache options for
other language than English ?

can you please insert the correct values here @Bronislawsky and i will add them to my fork. they may get pulled to this repo

    ## FRENCH - sensitive wordpress urls should always skip the cache
    if ($request_uri ~* "index.php|/account.*|/cart.*|/checkout.*|/contact.*|/dashboard.*|/login.*|/my-.*|/order.*|/profile.*|/register.*|/settings.*|/view.*|/wc-api.*|/wp-admin.*|wp-.*.php") {
        set $skip_cache 1;
    }

from slickstack.

jessuppi avatar jessuppi commented on July 29, 2024

As an aside, I mentioned this on the Pull Request but to begin considering support for 100 languages we should probably move the skip cache rules into a new Nginx module instead like:

/etc/nginx/conf.d/skip-cache.conf ... or something where users only install the skip cache rules for one language.

Ref: #141

from slickstack.

jessuppi avatar jessuppi commented on July 29, 2024

I don't know yet how to implement, but here's an example file:

https://github.com/littlebizzy/slickstack/blob/master/modules/nginx/languages/en_us.txt

By separating files like this, it makes it easier for users to contribute spelling fixes and other patches. And, it means each SlickStack server only needs to install the languages that they will use.

from slickstack.

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.