How to use CmsNlsOperations

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
Duketown

How to use CmsNlsOperations

Post by Duketown »

Hi,

In version 1.11 CmsNlsOperations::set_language_detector() has been introduced. I've not yet been able to go in detail on this class and its usage. Did someone else put it one way or the other already in one of their own build modules?
How was that done and to serve which purpose?

Thanks,

Duketown
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: How to use CmsNlsOperations

Post by calguy1000 »

The set_language_detector() method can be used from a modules InitializeFrontend() method to allow alternate methods of choosing a language.

i.e: your language detector object may use the browsers IP address, or a cookie to select the users 'language'.

others may try to detect from the browser settings, etc.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Post Reply

Return to “Developers Discussion”