Created
September 4, 2012 02:47
-
-
Save sun/3615986 to your computer and use it in GitHub Desktop.
Translatable config strings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$yaml = Yaml::dump('sun.settings.yml'): | |
id: my_settings | |
label: !!php/object:O:1:"t":1:{s:9:"*string";s:12:"Translate me";} | |
var_dump($parsed = Yaml::parse($yaml)): | |
array(2) { | |
["id"]=> | |
string(11) "my_settings" | |
["label"]=> | |
object(t)#34 (1) { | |
["string":protected]=> | |
string(12) "Translate me" | |
} | |
} | |
$yaml = Yaml::dump($parsed); | |
id: my_settings | |
label: !!php/object:O:1:"t":1:{s:9:"*string";s:12:"Translate me";} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment