Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 4

Author Topic: [MOD] Multiple Languages  (Read 21071 times)

Rui Mendes

  • Development,Testing, Support
  • Hero Member
  • *****
  • Karma: 195
  • Posts: 1009
  • sNews1.7
    • Comunidade Portuguesa
[MOD] Multiple Languages
« on: May 19, 2007, 08:46:13 PM »

Hello

You can have multiple languages on your website, new function "flags()"  to put in your index.php.
Example for freench put snews_FR and image FR.JPG (if you want show flag)


To make language available just add in Language List  (example: EN,PT,FR), you can find this in site settings

Download New Version September, 5

Want see a demo ? Here

If you want help to have many languages, you need to translate snews1.6 minimal and new variables
Code: [Select]
<?php 
# RUI VARIABLES 
   
$l['langlist'] = 'Language List (i.e: EN,PT,FR)';
   
$l['choselang'] = 'Language';
   
$l['new_articles'] = 'New Articles';
   
$l['new_comments'] = 'New comments';} return $l[$variable]; 
?>


I ask one more thing, Can you translate sNews Home
Quote
Experience the lightweight elegance!
sNews is a completely free, standards compliant, PHP and MySQL driven content management system. Consisting of only one small core file, sNews is extremely lightweight, easy to install, and easy to use via a simple web interface.

sNews is for everyone
With sNews you can create a website that consists of dynamic pages and have a blog at the same time. sNews has a front page option and categories for you to categorize your articles. Corporate CMS or a personal blog - your choice.

Search Engines dig sNews. Really.
sNews uses search engine friendly URLs throughout, to make your website truly loved by Google and other search engines (as well as your visitors). This makes a sNews driven site highly Search Engine Optimized from the get-go and will greatly assist in your site obtaining a good SEO ranking.

Send to me, my email is:
engcivil.net[at]gmail.com

Best regards,
Rui Mendes
« Last Edit: September 08, 2007, 12:41:02 PM by Rui Mendes »
Logged
Need a Job on Europe. Linkdin - Facebook / Group

Rui Mendes

  • Development,Testing, Support
  • Hero Member
  • *****
  • Karma: 195
  • Posts: 1009
  • sNews1.7
    • Comunidade Portuguesa
[MOD] Multiple Languages
« Reply #1 on: May 19, 2007, 11:50:35 PM »

If you download first version, please download again "File update fixed'

Sorry, I think is working 100%
Logged
Need a Job on Europe. Linkdin - Facebook / Group

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
[MOD] Multiple Languages
« Reply #2 on: May 20, 2007, 12:08:01 AM »

Excellent contribution Rui. :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Sasha

  • Hero Member
  • *****
  • Karma: 28
  • Posts: 938
    • cssanarchy.com
[MOD] Multiple Languages
« Reply #3 on: May 20, 2007, 01:47:24 AM »

hm you fix now this file  :| ...this file is corrupt ZIP anr RAR cant open file ..you need to fix this again  ......
Logged
Every morning, I get up and look through the 'Forbes' list of the richest people in America. If I'm not there, I go to work. | If you love your job, you haven't worked a day in your life. snews with ♥

Joost

  • Guest
[MOD] Multiple Languages
« Reply #4 on: May 20, 2007, 01:53:12 AM »

Quote from: sasha
hm you fix now this file  :| ...this file is corrupt ZIP anr RAR cant open file ..you need to fix this again  ......
I have no problems opening the file (zip and 7-zip). Download again
Logged

Sasha

  • Hero Member
  • *****
  • Karma: 28
  • Posts: 938
    • cssanarchy.com
[MOD] Multiple Languages
« Reply #5 on: May 20, 2007, 02:46:45 AM »

hm working now :) thx joost
Logged
Every morning, I get up and look through the 'Forbes' list of the richest people in America. If I'm not there, I go to work. | If you love your job, you haven't worked a day in your life. snews with ♥

Pali

  • Full Member
  • ***
  • Karma: 16
  • Posts: 111
    • LE-PAVON
[MOD] Multiple Languages
« Reply #6 on: May 21, 2007, 11:08:40 AM »

Inside the zip called snews16ml2.zip is folder MA containing sNews1.6 with Multiple Areas 1.0 mod... Has somebody correct version?
Logged
I like sNews!

Rui Mendes

  • Development,Testing, Support
  • Hero Member
  • *****
  • Karma: 195
  • Posts: 1009
  • sNews1.7
    • Comunidade Portuguesa
[MOD] Multiple Languages
« Reply #7 on: May 21, 2007, 12:01:12 PM »

I'm sorry my mistake

Please download again
Logged
Need a Job on Europe. Linkdin - Facebook / Group

Ghassem Tofighi

  • Full Member
  • ***
  • Karma: 9
  • Posts: 104
    • http://ght.ir
[MOD] Multiple Languages
« Reply #8 on: May 21, 2007, 02:56:24 PM »

Thanks ruimendes
Nice job
But there is some problems:

1) Multi Language is not only converting words from some language to another.for example for "right to left languages" we must change the css file.

2)when I hear about multi language cms I think in this way:
if multi language is meaning 2 languages, in article section we must have 2 fields for title,text,and which fields that are different from one language to another one.
this is not very complicated job and by html form generator function in sNews you can easily add it to admin section.

3)I asked before a question that in suggestion section but nobody didn't answer me.It was about choosing language and I have the same purpose.
but in my design I thought to specify language in url like this :
http://localhost/en/article/title ....
http://localhost/xx/article/title ....
and in admin section I used en_title and xx-title (instead of title ) and en_text and xx-text (instead of text) article table of my database.

4)you release an individual package for your work . please consider the situation I patch my sNews and I want add your mod. then please describe how change sNews to reach your design instead of releasing new type of sNews.

Thanks  ;)
Logged
Be A Color Pencil For Painting The World !

Pali

  • Full Member
  • ***
  • Karma: 16
  • Posts: 111
    • LE-PAVON
[MOD] Multiple Languages
« Reply #9 on: May 21, 2007, 05:35:35 PM »

Hello,

nice mod, i like the SESSION way - this is the simplest way to implement this thing to sNews... There is no need big hacking of sNews core...

Of course - this will not work with COOKIES disabled.

Complex thing like requested by ght is far away from this and is much more complicated... Big CMS have problems with this also.

Thanks Rui
Logged
I like sNews!

Leonardo

  • Newbie
  • *
  • Karma: 2
  • Posts: 22
    • http://leonardoprosperi.com
[MOD] Multiple Languages
« Reply #10 on: May 22, 2007, 02:06:58 AM »

Quote from: ght
Thanks ruimendes

2)when I hear about multi language cms I think in this way:
if multi language is meaning 2 languages, in article section we must have 2 fields for title,text,and which fields that are different from one language to another one.
this is not very complicated job and by html form generator function in sNews you can easily add it to admin section.

3)I asked before a question that in suggestion section but nobody didn't answer me.It was about choosing language and I have the same purpose.
but in my design I thought to specify language in url like this :
http://localhost/en/article/title ....
http://localhost/xx/article/title ....
and in admin section I used en_title and xx-title (instead of title ) and en_text and xx-text (instead of text) article table of my database.

4)you release an individual package for your work . please consider the situation I patch my sNews and I want add your mod. then please describe how change sNews to reach your design instead of releasing new type of sNews.
My interpretation of multi-language is like yours.
I did a MOD for sNews 1.5, now I'm working on the 1.6 version.
I'll release it in my website, where you can see how it works.

The admin section is not yet friendly.
My patch changes deeply the code, so it's hard the apply to a website.
It's easier to start from scratch and apply all the other mods.

Leonardo
« Last Edit: August 22, 2007, 05:54:46 AM by Phil Martin (Philmoz) »
Logged

codetwist

  • Hero Member
  • *****
  • Karma: 50
  • Posts: 940
[MOD] Multiple Languages
« Reply #11 on: May 23, 2007, 10:21:24 AM »

Hey, rui ;)

I admire Your determination and productivity; great mods definitely.

@leo1981, ght : Done work is done work. Still there always is room for improvements and other approaches; that's healthy competition ;)
Logged

Leonardo

  • Newbie
  • *
  • Karma: 2
  • Posts: 22
    • http://leonardoprosperi.com
[MOD] Multiple Languages
« Reply #12 on: May 24, 2007, 06:23:21 AM »

Quote from: codetwist
@leo1981, ght : Done work is done work. Still there always is room for improvements and other approaches; that's healthy competition ;)
I built that mod because I needed for my website. It's not a competition. ;)
The two mods have the same name, but different behaviors.

Leonardo
Logged

codetwist

  • Hero Member
  • *****
  • Karma: 50
  • Posts: 940
[MOD] Multiple Languages
« Reply #13 on: May 24, 2007, 08:52:02 AM »

@Leonardo : Competition isn't bad per se ;)  So, bring Yours out of its CLOSET RIGHT HERE AND NOWWWWWWW ...  :lol:

On more serious note may be You can drop a note in Programming section (I hope we still have one) with list of   feature set ;) This thread after all is for finished version of ruis MOD.
Logged

Davor

  • Newbie
  • *
  • Karma: 0
  • Posts: 13
    • Bijeli Anđeli
[MOD] Multiple Languages
« Reply #14 on: June 07, 2007, 01:02:26 AM »

Great mod, but unfortunately it doesn't work well for me :(

When I want to edit article in language other than English, I can't choose category - article is shown on Home page in English section of site. If I want to edit article, I can't - have to delete it first, then republish edited version.

Hope it will be fixed soon  :)
Logged
Pages: [1] 2 3 4