Giter VIP home page Giter VIP logo

Comments (8)

jeffharrell avatar jeffharrell commented on July 27, 2024

Content keys are evaluated at build time and can't be based on runtime data. Why not just move the content to a country specific template instead?

from makara.

tsullivan avatar tsullivan commented on July 27, 2024

There are more use cases that a fix here would benefit beyond the example I gave of separating country-specific content, but I guess even then, using foo-specific partial templates and loading one dynamically would be a valid alternative to using a logical structure for selecting one of multiple foos.

I mainly just wanted this limitation to be documented somewhere. This can be closed.

from makara.

xjamundx avatar xjamundx commented on July 27, 2024

Well country-specfic template is the main use-case. Is there a solution for that?

from makara.

xjamundx avatar xjamundx commented on July 27, 2024

Actually in our case, we have one line per state, so 50 files with 1 property each seems a bit crazy, but I guess the current best option. Our approach is to just read the properties in the controller and send down the current value as a variable. Kind of lame, but easier than creating 50 new files!

from makara.

jeffharrell avatar jeffharrell commented on July 27, 2024

Country specific templates are available as of kraken 1.0 (in beta) with specialization.

from makara.

jeffharrell avatar jeffharrell commented on July 27, 2024

Closing this out though, per @tsullivan's point.

from makara.

mikesparr avatar mikesparr commented on July 27, 2024

@xjamundx I trust the PayPal team will have better way to solve but short term, feel free to use a helper I just created to solve similar. The model injection is incomplete but perhaps someone can fork and complete the helper. Find at https://github.com/mikesparr/Kraken_Example_i18n_Helper

You can choose your bundle and key so it's at least a start.

from makara.

aredridel avatar aredridel commented on July 27, 2024

Awesome. Thanks, @mikesparr!

We're actually moving toward more runtime evaluation of some of this, which will help immensely.

from makara.

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.