GithubHelp home page GithubHelp logo

Comments (4)

giansi avatar giansi commented on September 18, 2024

Not yet experienced with Grav multilanguage. I will check it ASAP

from grav-plugin-cookies-policy.

tidiview avatar tidiview commented on September 18, 2024

☆ Hello Giansi

I just upgraded thrue GPM from 1.0.4 to 1.0.6 thinking that the changes that I made with Sommerregen to internationalize cookiespolicy where included ...
And they were NOT.
The successfull work that we made together with Sommerregen in that direction has been LOST!

Please note that I am not searching for responsability, just describing what happened so that you can understand the situation.

I have tried to get things back to previous but, while it's not that complicated, I am starting to become CRAZY.

♪ So I am kindly asking you some help, hoping that you can ☆

Underneath, that's what it is about:

I would like to assign to each variables of cookiespolicy.html.twig a value so that It can be displayed in the appropriate language using twig function {{ 'some_string'|t }} (as we have been doing previously).

But this time, I can't get it to work now and I feel ridiculous and also ashamed of contacting Sommerregen again: at the same time, cookiespolicy REALLY NEED to support MULTILANGUAGE.

With Sommerregen, we made a structured language.yaml file like this:


fr:
PLUGINS:
COOKIES_POLICY:
MESSAGE: "En continuant à naviguer sur ce site, vous acceptez l'utilisation de cookies afin de réaliser des statistiques d'audiences et vous proposer des services et une offre adapés à vos centres d'intérêts."
PRIVACY: "En savoir plus"
CLOSE: "Fermer"
URL: "http://francois-vidit.fr/fr/c-u"

ja:
PLUGINS:
COOKIES_POLICY:
MESSAGE: "当サイトはより最適なサービスを提供するためにクッキーを使用しています。このサイトのサービスを利用することで、お客様はサイトがクッキーを使用することに同意したことになります。 "
PRIVACY: "詳細"
CLOSE: "閉じる"
URL: "http://francois-vidit.fr/ja/c-u"

en:
PLUGINS:
COOKIES_POLICY:
MESSAGE: "We use cookies to help us give you the best experience when using our website. Unless you change your settings, we will assume that you agree for us to do this. However, you can change your settings at any time according with your browser."
PRIVACY: "Learn more"
CLOSE: "Close"

URL: "http://francois-vidit.fr/en/c-u"

All the variables of cookiespolicy.html.twig are assigned there value according to language: it has been working beautifully until the blind upgrade of yesterday night !!!!

Thanks in advance for your help ♪ and LET'S INTERNATIONALIZE COOKIESPOLICY PLUGIN !

from grav-plugin-cookies-policy.

Sommerregen avatar Sommerregen commented on September 18, 2024

Dear @giansi and @tidiview ,

I've pushed a PR with the changes I made to make Cookie Policy plugin multi-language compatible. Now one can override those strings in a language filer user/languages/<langcode>.yaml, where <langcode> is the two character short code for the country using the keys specified in the languages.yaml.

Have fun!

from grav-plugin-cookies-policy.

giansi avatar giansi commented on September 18, 2024

Thank you guys!

from grav-plugin-cookies-policy.

Related Issues (9)

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.