-
- 5,888 Posts
maybe the &includeContent=`1` property on the mmlCache - snippet is missing
Looking at it again, it's a wrapper for pdoResources, so of course it would need to have the same properties. Duh!
-
- 5,888 Posts
will add that property, to be there by default, to the default-template for the next version
What would be the best way to find out what placeholders are available, to each snippet as well as in content? For example, if I want to do something like this
<html dir="[[++cultureKey:is=`he`:then=`rtl`:else=`ltr`]]" lang="[[++cultureKey]]">
is there a MIGx placeholder, or is using the system setting the correct way to access that value?
-
- 5,888 Posts
using the system-setting should be the correct way.
There aren't any special placeholders other than the resource-fields and TVs and others which was generated by pdoResources.
If you remove the &tpl you should see all of them.
Perhaps we should add another field to language-table for the lang-direction
-
- 5,888 Posts
How would we name a system-setting for the lang-direction ?
lang_dir
lang_direction
cultureDir
could only find a manager_direction system-setting
Yes, another field like lang_dir for the language table might be the best way, and just add the placeholder [[+lang_dir]]. Otherwise you'd need a snippet to handle more than one rtl-language, rather than the simple output modifier I've used with only one.
Hm. I can't find any automated way of determining a language's direction, such as using "locale" or any other PHP built-in method. Which is a bit odd, seeing that PHP is developed and maintained in Israel.
And of course I'm getting all kinds of results from a Google search, but at the moment StackOverflow seems to be down.
-
- 5,888 Posts
Hm. From the W3C, referring to user agents...
User agents must not use the lang attribute to determine text directionality.
Maybe this is why there doesn't seem to be a way to get the language direction from the locale or the language code. I can see the point, just because one is using a rtl language doesn't mean that one wants to have everything shifted to the right. They are two completely different specifications.