Irrelon / jquery-lang-js

i18n Allow instant language switching on HTML pages without reloading the page.
https://www.irrelon.com
362 stars 132 forks source link

Added support for custom token name #61

Closed kevkha closed 8 years ago

kevkha commented 8 years ago

and cookie expiry and path

Irrelon commented 8 years ago

Hi, this has to be rejected because it alters the initialisation of the library by adding a new argument at the beginning which would break existing implementations by other users.

We can do that but requires documenting and updating a major version number to ensure that users know an upgrade will break their existing implementation - there are a LOT of users of this library :)

I am going to take your code and merge it into the dev branch, update the library to allow an options object instead of multiple arguments (for further extension without breaking) and then push as a new major version :)

Irrelon commented 8 years ago

Version 3.0.0 including your updates is now available. Please note I removed the cookie() method and incorporated your token name, expiry and path into the init() method's options argument :)

kevkha commented 8 years ago

v3.0.0 looks great! I like your solution. Thanks so much for your time putting all these together for the community.

Irrelon commented 8 years ago

:) thank you for taking the time to contribute to the project!! It's also nice that your code was clean and well thought out which made it very easy to work with. Appreciation all round :+1:

kevkha commented 8 years ago

Thank you! I tried ;) I was able to upgrade to v3.0.0 and everything works. Nice job!