Fork me on GitHub
Get XOOPS XOOPSXOOPS FAQFAQ ForumsForums NewsNews ThemesThemes ModulesModules
New Posts New Topics All Posts All Forums Index General Modules Themes Development International XOOPS.org

Search

Donat-O-Meter

Make donations with PayPal!
Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00

Learn XOOPS Core

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

- 2 2.5 2.6 3.0 4 6 2013 Abuse adslight Android AntiHarvesting AntiMalUser AntiSpam Apple Battlefield billige Blocks Bootstrap Captcha cell cent chronolabs CHUNG Clicks content CĂN demo docek download Dresses evden eve facebook Fat floor Food for free Gateway Google Guide herre Home Honeypot HP html5 Human HỘ IP iPhone jQuery List log Loss mobile module modules Monster new newbb news NHÀ online PARK phone PHP Prevention profile project Protector publisher RESIDENCE responsive review Rights rmcommon Room security Sentry site Smartphone Smoking Spam Studio support tags tdmcreate template The Theme themes User userlog web weight xoops Xortify

New Users

Registering user

# 137304

fr0g

Welcome to XOOPS!




Bottom   Previous Topic   Next Topic  Register To Post

« 1 (2) 3 4 5 »


#11 Posted on: 2012/7/11 20:50 Re: XOOPS 2.6 Internationalization/Local support
redheadedrod:
I read your post almost 3 times but i still fear i could not understand it totally.
Quote:

Storing dates and times in the standard database format allows you to perform queries based on those "standardized" dates.

Quote:

Internally the date/time is normally stored as so many seconds since a certain time/date but is seldom accessed directly in that manner.


do you mean there is just one unique standard database format as i mentioned before as "int"?
so i can show you my prev example in more detailed manner:

In local persian:
Database int("2012-07-11")----formatTimestamp---> jdate local---> "1391-04-21" --> userside
In general (english):

Database int("2012-07-11")---formatTimestamp---> userside

Quote:

Sounds like to "globalize" we just need a way to convert back and forth between different calendar types.

please as i stated in the first post do not conflict between "localization/internationalization" and "globalization". They are not in contrary with each other nor have any relations. they are completely different concepts. you can localize without globalize or globalize without localize or you can do both or none of them.
[off topic]
globalization examples in xoops: using google recaptcha, sfs, xortify cloud, relations with social networks like twitter, facebook and ...
[/off topic]

Quote:

do it in a manner that we can use generic statements to store or retrieve the data that would translate for the different calendars.


I already show you how we can retrieve using current xoops local function "formatTimestamp". Also I can show you the local way of storing (the backward way)

eg using the current core functions (userTimeToServerTime, strtotime):
In local persian:
Database int( "2012-07-11")<-- userTimeToServerTime <--- strtotime---- "2012-07-11"<--- inputTimeToGregorian local <--- "1391-04-21" <--- userside
In general (english):
Database int("2012-07-11")<-- userTimeToServerTime <--- strtotime---- "2012-07-11" <--- userside

Quote:

By this I mean you could set your site to use a calendar and all the display and entry of the site would use the preferred calendar but it would still store them in the database in the format the database desires

excellent, the best explanation of date/time localization.

Quote:

but by using these core routines that take care of the conversion for you they do the "dirty" work


No. not at all. the above using formatTimestamp function to localize output date/time is the cleanest way i can imagine.
no core file is hacked. the function is just located in language/persian/locale.php

same we can do for input date/time.
currently strtotime is not localized. you can find some examples in the core files like this one in modules/system/admin/mailusers/main.php
$time strtotime(trim($_POST['mail_lastlog_max']));
                    if ( 
$time ) {
                        
$criteria[] = "last_login < $time";

core developers should localize "strtotime" or define a new xoops function for input date/time from scratch.

see this feature request:
http://sourceforge.net/tracker/?func= ... roup_id=41586&atid=430843

Quote:

Then promote the use of these core routines to module developers.

rather than that IMO we should force them. eg: now if they dont use "formatTimestamp" it will considered as a bug.

Mamba wrote in another topic:
Quote:

In the near future, we'll need to convert News from fpdf to tcpdf, so all modules are consistently using tcpdf, and we can provide tcpdf as part of XOOPS library.

excellent approach. but tcpdf is above 10MB.


Top

irmtfan
Module Developer
Module Developer
Joined:
2003/12/7 14:14
From In the middle of nowhere
Group:
Registered Users
Community Coordinator (temporary)
Posts: 3366
(Show More) (Show Less)


#12 Posted on: 2012/7/12 0:58 Re: XOOPS 2.6 Internationalization/Local support
Quote:

Then promote the use of these core routines to module developers.

I like to write about this more and i will provide you detailed examples that how to promote.

Many localization matters are already available inn core but developers/desginers never used them.
for eample please promote "image localization" for xoops theme designers.
we should encourage xoops theme designers to use local lang smarty code for images. (all images would be better but for images contain some characters would be nessesary)
currently everything is localized in themes and multi-language is implemented in official english themes released in xoops 2.5.5 except images.
eg: in xoops255/htdocs/themes/default/theme.html

<img src="<{xoImgUrl xoops-logo.png}>" alt="<{$xoops_sitename}>" />

should be changed to:
1st way:
<img src="<{xoImgUrl xoops-logo.<{$xoops_langcode}>.png}>" alt="<{$xoops_sitename}>" />
2nd way:
<img src="<{xoImgUrl img/<{$xoops_langcode}>/xoops-logo.png}>" alt="<{$xoops_sitename}>" />

then the image should be renamed like below:
1st way:
xoops-logo.en.png

2nd way:
img/en/xoops-logo.png

please choose the preferred/best way for doing that. Then it should be promoted.

Quote:

timgno wrote:
My modest support is available


Yes and i support it.
Quote:

2- core developers should add "JQuery UI datepicker" first then all developers can use that in their codes.


just please consider localization. ability for including js files in different languages.
could you implement that and show us the result?


Top

irmtfan
Module Developer
Module Developer
Joined:
2003/12/7 14:14
From In the middle of nowhere
Group:
Registered Users
Community Coordinator (temporary)
Posts: 3366
(Show More) (Show Less)


#13 Posted on: 2012/7/12 1:45 Re: XOOPS 2.6 Internationalization/Local support
Quote:
excellent approach. but tcpdf is above 10MB.

1) Once you download tcpdf library, you don't have to do it the second time. Right now many modules are having it internally, so if you have 3 modules, you have to download 30 MB

2) But I think that PDF should be done as "optional", i.e. if the users selects PDF option in Preferences, the module should check if tcpdf library exist, and if not, then it should tell the user to download it. This will be good for people who don't care about having PDF in a module...

Top


Please support XOOPS & DONATE
Use 2.5.6 | Debugging | Requests | Bugs
Mamba
Moderator
Moderator
Joined:
2004/4/23 13:58
From Ohio, USA
Group:
Webmaster
Registered Users
Designer Group
Posts: 7840
(Show More) (Show Less)


#14 Posted on: 2012/7/14 4:32 Re: XOOPS 2.6 Internationalization/Local support
I had a conversation with Voltan in xoops persian local support site and he mentioned that the main size of tcpdf is its "fonts" folder.
So the best way would be including tcpdf with some necessary fonts in the core and make some localization enhancement for others to add fonts in their local.
eg: language/LANG/fonts

IMO xoops need a "font manager" and "mimetype manager" as plugins in system module .You can see many module have internal functions/tables/scripts for mimetype and font managing. Now im about to send another feature request for them.



Top

irmtfan
Module Developer
Module Developer
Joined:
2003/12/7 14:14
From In the middle of nowhere
Group:
Registered Users
Community Coordinator (temporary)
Posts: 3366
(Show More) (Show Less)


#15 Posted on: 2012/7/14 10:26 Re: XOOPS 2.6 Internationalization/Local support
Hello

I just installed version 2.6 Operating on the svn. By local, I can access a modules/system/admin.php?fct=preferences&op=show&confcat_id=1

Only on my hosting I have a blank page with this message :

Quote:
Fatal error: Declaration of XoopsForm::getElements() must be compatible with that of XoopsFormContainer::getElements() in /homez.428/xoopsdem/www/26/class/xoopsform/form.php on line 27


I have the same error message when I try to acces to : modules/system/admin.php?fct=blocksadmin , modules/system/admin.php?fct=images , and other links

Top

tatane
Just can't stay away
Just can't stay away
Joined:
2008/5/6 11:51
From FRANCE
Group:
Registered Users
Posts: 501
(Show More) (Show Less)


#16 Posted on: 2012/7/16 4:06 Re: XOOPS 2.6 Internationalization/Local support
Quote:

tatane wrote:
Hello

I just installed version 2.6 Operating on the svn. By local, I can access a modules/system/admin.php?fct=preferences&op=show&confcat_id=1

Only on my hosting I have a blank page with this message :

Quote:
Fatal error: Declaration of XoopsForm::getElements() must be compatible with that of XoopsFormContainer::getElements() in /homez.428/xoopsdem/www/26/class/xoopsform/form.php on line 27


I have the same error message when I try to acces to : modules/system/admin.php?fct=blocksadmin , modules/system/admin.php?fct=images , and other links


it's good it works, I had not activated the php 5.3 in my htaccess
Here is a small demonstration of a suitable theme in xoops 2.6

http://demo2.6.xoops-demo.com/

Top

tatane
Just can't stay away
Just can't stay away
Joined:
2008/5/6 11:51
From FRANCE
Group:
Registered Users
Posts: 501
(Show More) (Show Less)


#17 Posted on: 2012/7/16 4:56 Re: XOOPS 2.6 Internationalization/Local support
Quote:
tatane wrote:
it's good it works, I had not activated the php 5.3 in my htaccess
Here is a small demonstration of a suitable theme in xoops 2.6

http://demo2.6.xoops-demo.com/

Tatane, very nice work!

All, if you have new themes for XOOPS 2.6.0 that you would like to share, please submit them in this new thread. Let's use Bootstrap and be creative!

Top


Please support XOOPS & DONATE
Use 2.5.6 | Debugging | Requests | Bugs
Mamba
Moderator
Moderator
Joined:
2004/4/23 13:58
From Ohio, USA
Group:
Webmaster
Registered Users
Designer Group
Posts: 7840
(Show More) (Show Less)


#18 Posted on: 2012/7/16 5:06 Re: XOOPS 2.6 Internationalization/Local support
However, it would be nice to add in the default theme in 2.6 the function <{$block.module}>-<{$block.id}> to enable the management of custom blocks

Top


http://xoops-demo.com
tatane
Just can't stay away
Just can't stay away
Joined:
2008/5/6 11:51
From FRANCE
Group:
Registered Users
Posts: 501
(Show More) (Show Less)


#19 Posted on: 2012/7/19 1:10 Re: XOOPS 2.6 Internationalization/Local support
Quote:


Many localization matters are already available inn core but developers/desginers never used them.
for eample please promote "image localization" for xoops theme designers.
we should encourage xoops theme designers to use local lang smarty code for images. (all images would be better but for images contain some characters would be nessesary)
currently everything is localized in themes and multi-language is implemented in official english themes released in xoops 2.5.5 except images.
eg: in xoops255/htdocs/themes/default/theme.html

<img src="<{xoImgUrl xoops-logo.png}>" alt="<{$xoops_sitename}>" />

should be changed to:
1st way:
<img src="<{xoImgUrl xoops-logo.<{$xoops_langcode}>.png}>" alt="<{$xoops_sitename}>" />
2nd way:
<img src="<{xoImgUrl img/<{$xoops_langcode}>/xoops-logo.png}>" alt="<{$xoops_sitename}>" />

then the image should be renamed like below:
1st way:
xoops-logo.en.png

2nd way:
img/en/xoops-logo.png

please choose the preferred/best way for doing that. Then it should be promoted.

following the above for theme images, i recently see the developer of newbb introduced a very nice and professional fabulous work for fully customizing and localizing a module images.
IMO current core developers should follow this way and define a new image class in the core of xoops 2.6 and introduced it to all module developers. Then we can have the first CMS in the globe with the deepest image customizing/localizing.
This is a full customizing because It works without touching any core/module images. Therefore End user just need to copy all images in the "htdocs/themes" folder. So after updating a module he/she dont worry about losing its own created images by mistakenly overwriting some module images.

End user can follow the below instruction for customizing and localizing:
Priority for path per types:
NEWBB_ROOT -    IF EXISTS XOOPS_THEME/modules/newbb/images/, TAKE IT
*     ELSEIF 
EXISTS XOOPS_THEME_DEFAULT/modules/newbb/images/, TAKE IT
*     ELSE 
TAKE XOOPS_ROOT/modules/newbb/templates/images/. 
types:
*     
button/misc    language specified
*     
//indicator    -    language specified; 
*     icon     -    universal
*     
mime     -    universal
*/

So for example if i want to implement a new image set for all of my themes in the website i can copy them to the below folders:

themes/default/modules/newbb/images/icon
themes
/default/modules/newbb/images/language/english
themes
/default/modules/newbb/images/language/persian


You can see that I dont want to customize "rpg" and "mime" icons so the newbb will read the original ones from newbb original folders:
XOOPS_ROOT/modules/newbb/templates/images/rpg
XOOPS_ROOT
/modules/newbb/templates/images/mime


If i want to create a custom imageset for a special theme i can easily add to that theme folder:
themes/MY_THEME/modules/newbb/images/icon
themes
/MY_THEME/modules/newbb/images/language/english
themes
/MY_THEME/modules/newbb/images/language/persian


coders can read below to find the class that make it available:

The class is defined in newbb/class/icon.php file
eg: a function "getPath":

$path is_dir($theme_path."/{$rel_images}/{$type}/"
                    ? 
$theme_path."/{$rel_images}/{$type}"  
                    
: ( is_dir(XOOPS_THEME_PATH."/default/{$rel_images}/{$type}/"
                        ? 
XOOPS_THEME_PATH."/default/{$rel_images}/{$type}"  
                        
: ( empty($default) || is_dir(XOOPS_ROOT_PATH."/modules/{$dirname}/templates/images/{$type}/")
                            ? 
XOOPS_ROOT_PATH."/modules/{$dirname}/templates/images/{$type}
                            
XOOPS_ROOT_PATH."/modules/{$dirname}/templates/images/{$default}
                        
)  
                    );


Then function called "newbb_displayImage" in file newbb/include/functions.render.php
function newbb_displayImage($image$alt ""$display true$extra "class='forum_icon'"

    
$icon_handler newbb_getIconHandler(); 
    if (empty(
$display)) { 
        return 
$icon_handler->assignImage($image$alt$extra); 
    } else { 
        return 
$icon_handler->getImage($image$alt$extra); 
    } 
}


so module developers can use this function very easy like this:
$xoopsTpl->assign('img_newposts'newbb_displayImage('topic_new',_MD_NEWPOSTS));
$xoopsTpl->assign('img_hotnewposts'newbb_displayImage('topic_hot_new',_MD_MORETHAN));
$xoopsTpl->assign('img_folder'newbb_displayImage('topic',_MD_NONEWPOSTS));
$xoopsTpl->assign('img_hotfolder'newbb_displayImage('topic_hot',_MD_MORETHAN2));
$xoopsTpl->assign('img_locked'newbb_displayImage('topic_locked',_MD_TOPICLOCKED));

$xoopsTpl->assign('img_sticky'newbb_displayImage('topic_sticky',_MD_TOPICSTICKY));
$xoopsTpl->assign('img_digest'newbb_displayImage('topic_digest',_MD_TOPICDIGEST));
$xoopsTpl->assign('img_poll'newbb_displayImage('poll',_MD_TOPICHASPOLL));


Please add this class in the core. Then XOOPS will be the first ever CMS that have the fully customized images feature.
Also please if you can take a look at this feature:
Image creator class
I think it is very nice to create pictures for different languages automatically.









Top


Ready for Romance
First Persian Harry Potter Site(English added) | Persian Support Site | Xoops Persian Project
irmtfan
Module Developer
Module Developer
Joined:
2003/12/7 14:14
From In the middle of nowhere
Group:
Registered Users
Community Coordinator (temporary)
Posts: 3366
(Show More) (Show Less)


#20 Posted on: 2012/8/7 23:12 Re: XOOPS 2.6 Internationalization/Local support
To localization, use locale names instead of portuguese_br and portugueuese_pt, they're should be pt-BT and pt-PT.

Getting out of this 1.3 model of maintaining 4-10 files per module.
2 Files
---- module_admin_name.ini
---- module_site_name.ini

Getting out of PHP DEFINE statement, which is used here like devil's read the bible.
Adopt INI files, J! is not the only CMS using it, as u can see bellow, bigace
http://wiki.bigace.de/bigace:administration:languages
uses INI files too.

This
define("_AM_SENDTOUSERS","Send message to users whose:");
can look as
MOD_SOMETHING_AM_SENDTOUSERS=Send message to users whose:
much easier for reading and maintaining up to date.

Top


May The Source Be With You!
DCrussader
Friend of XOOPS
Friend of XOOPS
Joined:
2005/7/4 2:57
Group:
Registered Users
Posts: 551
(Show More) (Show Less)




« 1 (2) 3 4 5 »



You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.

[Advanced Search]