RSS 2.0
Browse posts:
Unanswered |
Mark all read
| Author | Message | ||||||||
|---|---|---|---|---|---|---|---|---|---|
|
Armon Nucleus Guru ![]() Joined: 16 Feb 2005 Posts: 1832 Location: Zaandam, Netherlands |
Edit by Leng: As suggested in Adding new Skin and Template vars
Sticky as this is an easy project which we can set up the framework for in the next week or so. Will be unstickied when the framework (skins site, FAQ, etc) is up and running. Original post NP_Text 0.2
Requires skin language file (skins/skin/language/language.php) where language is the language set by member, if it is not set it will default to globally set language. Language file must be of the following form:
I have chosen __SL_ as the prefix (mind the 2x _) because Nucleus internally uses the _WHAT_ prefix (where WHAT can be SKIN, ADMIN, etc.). If the skin language file is not found no text will be output but an error will be thrown in the Action Log. Maybe the language files should be even php-less. Maybe xml or something, more userfriendly. What do you think? _________________ Please update any "ported by Armon Toubman" links to http://www.armontoubman.com Thanks! Is your question not solved yet?
|
||||||||
|
|
|||||||||
|
Nefelim Nucleus Addict Joined: 30 May 2006 Posts: 56 Location: RUSSIA, Moscow |
Nice idea, Leng! As for me, I think PHP is ok, because any Nucleus CMS Site Administrator have to know it even basically. "Define" function is simple, there is no problem of creating language files. _________________ ~~~ Sith'ari ~~~ |
||||||||
|
|
|||||||||
|
Leng Nucleus Guru ![]() Joined: 19 Sep 2004 Posts: 2830 Location: Australia |
I think it is fine at the moment, the php-ness of the language file is not too overwhelming, as long as we provide some instructions on how to use to skin authors. If no one else gets a chance to, I will write up an FAQ for it next week (will be busy this weekend so can't do it then), link on skins site and add it to the skin contribution guidelines. I will also email Christian who did the skin translations to do some language files to save him the trouble, then get rid of the translated skins on the skins site. Maybe while the new SkinAdmin is under construction (http://forum.nucleuscms.org/viewtopic.php?t=13487), we can have language files hosted on a temporary section on the skins site? Also, splitting this topic into other improvements. Armon, perhaps you can do a cross-post in Plugin Announce so users are aware of this option when the framework is up and running? _________________
deborahlau.com | To-Do List Questions? See the FAQ, read the docs, or browse our plugins!! |
||||||||
|
|
|||||||||
|
Armon Nucleus Guru ![]() Joined: 16 Feb 2005 Posts: 1832 Location: Zaandam, Netherlands |
http://forum.nucleuscms.org/viewtopic.php?t=14906 _________________ Please update any "ported by Armon Toubman" links to http://www.armontoubman.com Thanks! Is your question not solved yet?
|
||||||||
|
|
|||||||||
|
Nefelim Nucleus Addict Joined: 30 May 2006 Posts: 56 Location: RUSSIA, Moscow |
Great! Let's see some details... Imagine, I'm an unregistered user, visiting some Nucleus based site. The default language is English, but I see an icon, displaying my native language (my country flag, for example). I need a click, that's simple to understand... But how a site designer should set a correct link or command to change skin language for user? And how should this setting be remembered (cookies?) for some time? _________________ ~~~ Sith'ari ~~~ |
||||||||
|
|
|||||||||
|
Armon Nucleus Guru ![]() Joined: 16 Feb 2005 Posts: 1832 Location: Zaandam, Netherlands |
Not with (only) this plugin. For this you'd need a different plugin that would set and read a cookie and set the language for an unregistered member. I don't know if setting the language for an unregistered member is possible at all with the Nucleus internal workings. _________________ Please update any "ported by Armon Toubman" links to http://www.armontoubman.com Thanks! Is your question not solved yet?
|
||||||||
|
|
|||||||||
|
Armon Nucleus Guru ![]() Joined: 16 Feb 2005 Posts: 1832 Location: Zaandam, Netherlands |
Well then, skin translations need to be checked and only be made available on and only be downloaded from the skins site. Because the words "malicious" and "code" just flashed through my head. _________________ Please update any "ported by Armon Toubman" links to http://www.armontoubman.com Thanks! Is your question not solved yet?
|
||||||||
|
|
|||||||||
|
Nefelim Nucleus Addict Joined: 30 May 2006 Posts: 56 Location: RUSSIA, Moscow |
Well, Armon. I personally think there is no need to remember unregistered visitor settings, because if he wants his settings to be remembered, he should register. The much important moment is how to select language for a current Skin. _________________ ~~~ Sith'ari ~~~ |
||||||||
|
|
|||||||||
|
Armon Nucleus Guru ![]() Joined: 16 Feb 2005 Posts: 1832 Location: Zaandam, Netherlands |
When the plugin is installed and all the language files are done, you select the language here: login, admin area, "username", settings, language To set the default language go to Global Options, language. _________________ Please update any "ported by Armon Toubman" links to http://www.armontoubman.com Thanks! Is your question not solved yet?
|
||||||||
|
|
|||||||||
|
Nefelim Nucleus Addict Joined: 30 May 2006 Posts: 56 Location: RUSSIA, Moscow |
It seems you did not understand me, Armon. It's actually not a problem to set your language, if your're registered user. But what if you're just a visitor? He wants to register or read something, but he can't, cause he don't know the "default" (usually, English) language. In that case I want a visitor to click "the button" and change the language. I do understand this operation can be restricted by Nucleus internals, but... Btw, whay did you choose double underscoped variable (__SL_)? Why not something like "_TEXT_" or "TEXT"? Just wondering, I can change the plugin code, if I need. _________________ ~~~ Sith'ari ~~~ |
||||||||
|
|
|||||||||
|
All times are GMT + 1 Hour
You cannot post new topics in this forum |
|||||||||