TyMaszWeb / django-cookie-law

Helps your Django project comply with the EU cookie regulations by displaying a cookie information banner until it is dismissed by the user
BSD 2-Clause "Simplified" License
140 stars 69 forks source link

Make i18n optional or mention in documentation #3

Open dschien opened 10 years ago

dschien commented 10 years ago

Hi,

I've set USE_I18N = False and end up with COOKIE_INFO_HEADER and COOKIE_INFO_OK COOKIE_INFO_PARA in my pop up.

It might make sense to mention in documentation.

gio82 commented 9 years ago

I've USE_I18N = True but the same issue. How did you resolved it? Thanks

dschien commented 9 years ago

Hi there. I'm sorry but I don't remember. I still have USE_I18N in my settings but it works. If I did make any adjustments - maybe by providing my own template - I don't remember.

gio82 commented 9 years ago

Thanks anyway! :)

piotrkilczuk commented 9 years ago

Hello @gio82 @dschien,

Sorry for not replying earlier.

I will definitely update the README. It is not an absolute requirement but it's recommended to leave I18n enabled if you want everything to work out of the box. Otherwise you'll have to overwrite the template yourself (cookielaw/banner.html), e.g.:

<div id="CookielawBanner">
    <div class="container">
        <h6>Cookies disclaimer</h6>
        <p>
            <a class="btn btn-primary pull-right" href="javascript:Cookielaw.createCookielawCookie();">I agree</a>
            Our site saves small pieces of text information (cookies) on your device 
            in order to deliver better content and for statistical purposes. You can         
            disable the usage of cookies by changing the settings of your browser. By 
            browsing our website without changing the browser settings you grant us 
            permission to store that information on your device.
        </p>
    </div>
</div>

Of course this template will be resolved using standard django template search mechanisms.