Code Monkey home page Code Monkey logo

kraken_example_localization's People

Contributors

jeffharrell avatar lensam69 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

kraken_example_localization's Issues

Show workaround for the caching/production bug in paypal/makara

Might be worth while updating the README and example to show the workaround for the caching/production bug in paypal/makara issue 9

i.e., if you run with NODE_ENV=production the localisation will not work as expected, you must use something like:

//In production, this is wrong:
res.locals.context = {
  locality: 'en_AU';
}; //Broken with NODE_ENV=production

res.locals.context = {
  locality: {
    country: 'AU',
    language: 'en'
  }
}; //Works with NODE_ENV=production

Mention how locales might get set in a real application

This is actually a good example (random selection makes a nice demo).

Might be good to call out in the documentation that in a real application you would most likely use a 'locale' value that could be passed as a URL parameter as well as setting it as a cookie value.

    var customerLocality = req.query.locale ? req.query.locale : 'US_en';

would pull from a locale parameter and fallback to US_en.

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.