Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PlugIn > translate Publication date
#25
(2013-01-21, 11:28:33)shawn_a Wrote: So do we also need to add a user date format or use it from Lang or provide a bunch of predefined ones?

Basically GetSimple needs to separate web site (frontend) settings and administration (backend) settings as regards language:

At least there should be a frontend language setting:
  • language (gsconfig.php or better in settings), but overwriteable by plugins (I18N)
  • and a function to retrieve the current language

Then, assuming the corresponding language is installed, defaults for the following can be taken from the GetSimple language file:
  • locale (new)
  • date/time settings (already exists, but should be able to use strftime)
Plugins displaying text on the frontend can either use these defaults or have special date/time settings (like short date) in their language files or provide an option on their plugin settings page.
The I18N plugin would still switch the language based on the user's language settings, but other plugins should be able to retrieve the current language with above mentioned language.

For the backend the language would still be the current user's language and the locale and date/time setting from the language file(s).

@Carlos: I like the idea to allow both old (date) and new (strftime) formats and decide which function to use based on the existence of "%".

P.S.: when setting the locale, LC_ALL should be used - this way numbers will also be shown in the correct format (. or , as decimal separator).
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply


Messages In This Thread
PlugIn > translate Publication date - by cumbe - 2010-05-02, 08:37:34
RE: PlugIn > translate Publication date - by mvlcek - 2013-01-21, 17:27:03
PlugIn > translate Publication date - by luc - 2011-06-15, 21:06:08
PlugIn > translate Publication date - by mvlcek - 2011-06-15, 21:50:12
PlugIn > translate Publication date - by ccagle8 - 2011-06-15, 22:07:32
PlugIn > translate Publication date - by cumbe - 2011-06-16, 03:36:40
PlugIn > translate Publication date - by yojoe - 2011-06-16, 04:04:57
PlugIn > translate Publication date - by mvlcek - 2011-06-16, 04:06:46
PlugIn > translate Publication date - by cumbe - 2011-06-16, 04:32:51
PlugIn > translate Publication date - by yojoe - 2011-06-16, 04:36:36
PlugIn > translate Publication date - by cumbe - 2011-06-16, 04:43:44
PlugIn > translate Publication date - by cumbe - 2011-06-16, 05:05:31
PlugIn > translate Publication date - by mvlcek - 2011-06-16, 05:05:52



Users browsing this thread: 1 Guest(s)