key1=value1
key2=value2
key3=value3
header h1=value1
.intro-text=value2
.pricing-description .first-paragraph=value3
.pricing-description .second-paragraph=value4
header h1
"value1"
.intro-text
"value2"
.pricing-description.pricing-description
.first-paragraph
"value3"
.second-paragraph
"value4"
Interesting idea, a few questions:
Are you thinking of using the same css parser that we use in snippets? I would like that because I then don't need to learn or restrictwhat I can use. On the other hand, it would mean seeing a lot of .h1 * (the asterisk to indicate the child of the node)
How would you tell lift which page uses which translations. I can see having a lot of h1 but with different content on different pages.
And one more but I forgot it :)
Thanks
Diego
Sent from my tablet
Diego
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I think we're still just scratching the surface of the awesome possibilities that CSS selector transforms really give us. This sounds like an awesome idea.
I think the best way to handle the different pages rule is going to be to apply semantic ID's to the body tags of the pages, and then scope your localizations relative to those.
Matt
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to a topic in the Google Groups "Lift" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/liftweb/ER3M49LHypY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to liftweb+u...@googlegroups.com.
header h1=value1
So, earlier this week I was brainstorming localizations.
Exciting topic, I know.
I was brainstorming them because I've realized that they're kind of a royal pain in their current implementation. From what I've seen you have two options for localizations:
- Localize an entire template and repeat a whole bunch of markup.
- Use a messages.properties file and pepper localization keys throughout your code.
I was left wondering if there wasn't A Better Way� to do localizations across an entire app, and I wanted to brainstorm with the rest of you guys and see if I could get some feedback on what I've been rolling around in my head. My primary goal in this is to get rid of the two options above entirely. What I'd love is a framework though with we could change the content of what appears on the page, using the actual content of the markup itself. I hear these style sheets that cascade are all the rage amongst the youngsters these days, and they have these "selectors" that let you pick what style in your sheet applies where.
Genius, amirite?
My thoughts are that we could use these "selectors" to "select" the "content" on the "page." Essentially, localization would become completely separate from the actual structural HTML. No more peppering localization keys about your code.
So where we currently have.
key1=value1
key2=value2
key3=value3
We could have
header h1=value1
.intro-text=value2
.pricing-description .first-paragraph=value3
.pricing-description .second-paragraph=value4
Or, perhaps, take a page from the SASS playbook:
header h1
� "value1"
.intro-text
� "value2"
.pricing-description.pricing-description
� .first-paragraph
� � "value3"
� .second-paragraph
� � "value4"
So, yeah, I wanted to get some thoughts around this. What do you guys think? I'm going to continue bouncing it around in my head throughout the next few weeks, so let me know. :)
Matt
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
�
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
�
�