Announcement
change locale without editing /modules/TexyTypographyModule.php
11 years ago
- jbendotnet
- Member | 5
hi,
I work in english, and had issues with quotes going wrong. I was using the compact version, but could not set the locale to ‘en’ without directly editing TexyTypographyModule.php.
my preference would be:
// create instance of Text
$this->__texy = new Texy();
// set locale to english
$this->__texy->locale = 'en';
// or
$this->__texy->setLocale('en');
or something of the sort, that way using compact or normal, you can alter your install very easily. Also, I think adding this info to the readme would be very beneficial!
thanks,
Jon
11 years ago
- David Grudl
- Nette Core | 6806
Hi Jon, you can use
$texy->typographyModule->locale = 'en';
I think $texy->setLocale(...)
is good idea, I'll most
probably implement it.
11 years ago
- matthew180
- Member | 3
David,
The setLocale() function you mention would be nice, but until then, how about just documenting it?
$texy->typographyModule->locale = 'en';
That would have saved me a having to look up the unicode value, check your code, and work backwards through the objects. However, I did learn a little about Texy! internals. ;)
Matthew