Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

colon (:) gives load error in locale YAML file

I have a string in en: locale which is

display_device: to play : get player

The colon sign is giving me error which is

can not load translations from C:/Documents and Settings/rajg/discoveryaws/branches/internationalization/config/locales/en.yml, expected it to return a hash, but does not

How can I make this work?

like image 383
RajG Avatar asked Dec 19 '12 14:12

RajG


1 Answers

You can escape colons (and other 'important' characters) in your string if you surround it with quotes like this:

display_device: "to play : get player" 
like image 177
PinnyM Avatar answered Sep 24 '22 21:09

PinnyM