Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Pages: 1 [2] 3 4

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

Rui Mendes

  • Development,Testing, Support
  • Hero Member
  • *****
  • Karma: 195
  • Posts: 1009
  • sNews1.7
    • Comunidade Portuguesa
[MOD] Multiple Languages
« Reply #15 on: June 07, 2007, 01:57:41 AM »

I'm sorry.
I'm busy, I'll see this soon promise.
Logged
Need a Job on Europe. Linkdin - Facebook / Group

Rui Mendes

  • Development,Testing, Support
  • Hero Member
  • *****
  • Karma: 195
  • Posts: 1009
  • sNews1.7
    • Comunidade Portuguesa
Re: [MOD] Multiple Languages
« Reply #16 on: September 05, 2007, 02:50:41 AM »

Hello friends

Correct a litle bugs and patch from sNews 1.6. See first post

I make a few changes, I think this way will working for who had cookies disable.

This version is the same policy of sNews ("Consisting of only one small core file").

Next stage making sNews1.6ML-AM (sNews Multiple Languages and Admin Mods).

Stay tuned...

 ;D
Logged
Need a Job on Europe. Linkdin - Facebook / Group

Boogada

  • Newbie
  • *
  • Karma: 3
  • Posts: 27
Re: [MOD] Multiple Languages
« Reply #17 on: September 08, 2007, 09:35:26 AM »

hi

I just installed this mod and I think its ok, but it is not working well with the German translation. It is not showing the new article and new comments headline.



So I guess I need to fix the DE language file? What exactly is wrong? And sorry I'm very new to this software.

the installation is here
« Last Edit: September 08, 2007, 09:37:02 AM by Boogada »
Logged

Joost

  • Guest
Re: [MOD] Multiple Languages
« Reply #18 on: September 08, 2007, 11:59:27 AM »

Not acquainted (yet) with Rui's mod, but at least you should have these (translated) in snews_DE.php

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 recommend comparing the translation file with one of the included translations.
Logged

Rui Mendes

  • Development,Testing, Support
  • Hero Member
  • *****
  • Karma: 195
  • Posts: 1009
  • sNews1.7
    • Comunidade Portuguesa
Re: [MOD] Multiple Languages
« Reply #19 on: September 08, 2007, 12:38:24 PM »

Yes you're right Joost, thank you.

I forgot put here "new variables" (only in this post).

Help me see the first post.

Another thing, see if Spanish and Freench are OK (I use translation.com to do this)

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

Boogada

  • Newbie
  • *
  • Karma: 3
  • Posts: 27
Re: [MOD] Multiple Languages
« Reply #20 on: September 08, 2007, 01:26:13 PM »

thank you, I added and translated the missing variables and it works now.

Code: [Select]
# RUI VARIABLES
$l['langlist'] = 'Sprachenliste (z.B.: EN,PT,ES,FR)';
$l['choselang'] = 'Sprache';
$l['new_articles'] = 'Neue Artikel';
$l['new_comments'] = 'Neue Kommentare';
Logged

Joost

  • Guest
Re: [MOD] Multiple Languages
« Reply #21 on: September 09, 2007, 11:05:16 AM »

Rui,

Are you aware of the following problem?
The default language-section works like every other sNews site. However, any secondary language is session based, it requires $xlang being set.
This means I cannot link to a page set to the secondary language. I am almost certain, that Google will have major problems indexing the secondary language. It might not even index it at all.

I ran into the same problem earlier and hoped you've had a solution for this issue. Just letting you know. :)


 
Logged

Rui Mendes

  • Development,Testing, Support
  • Hero Member
  • *****
  • Karma: 195
  • Posts: 1009
  • sNews1.7
    • Comunidade Portuguesa
Re: [MOD] Multiple Languages
« Reply #22 on: September 09, 2007, 12:49:00 PM »

Hello Joost, thank you.
Since last night, I was think about it.

Wait 1 or 2 more days. I start change code last night and I think is ready but need to do more tests

yourhost.com/en/
yourhost.com/pt/
yourhost.com/fr/
yourhost.com/de/

yourhost.com/en/cat1/
yourhost.com/pt/cat1/
yourhost.com/fr/cat1/
yourhost.com/de/cat1/

I make one feature to link to another language
I think this way we solve this problem. What you think about it?
« Last Edit: September 09, 2007, 12:53:24 PM by Rui Mendes »
Logged
Need a Job on Europe. Linkdin - Facebook / Group

Joost

  • Guest
Re: [MOD] Multiple Languages
« Reply #23 on: September 09, 2007, 01:14:21 PM »

Looks promising, Rui. Does it mean there has to be a .htaccess (mod_rewrite) modification?
Logged

Vasile Rusnac

  • Newbie
  • *
  • Karma: 7
  • Posts: 49
Re: [MOD] Multiple Languages
« Reply #24 on: September 13, 2007, 08:43:10 PM »

Hi guys,

since I have migrated to snews from joomla I was thinking of this mod to be more more or less as joomfish combined with joomsef which means that links should look something like this: http://host.com/lang/article/ (idea that you have already came to) while posting articles to different languages will require to click on "translate" or some other link in the admin panel, where you can select which language you would like to post your article  and the content of it.

and obviously, there should be re-wrote the .htaccess file to make the links appear in the correct format

i am aware this is not an easy thing to do :) but this is the right thing to do to assure pages are indexed by search bots and to make it easier for admins to translate pages.

cheers.
Logged

Rui Mendes

  • Development,Testing, Support
  • Hero Member
  • *****
  • Karma: 195
  • Posts: 1009
  • sNews1.7
    • Comunidade Portuguesa
Re: [MOD] Multiple Languages
« Reply #25 on: September 13, 2007, 10:21:03 PM »

Hello guys, I'm so sorry I was very, very busy (next week maybe I've more time) .

I have some problems to solve

This mod takes more time to finish, I prefer publish when is ready. I'm sorry :(

You can try this DEMO click in flag you want, I can't make automatically (must think how can do it).

This Mod you can add categories with same name but different language.
Example:
Create a category Software for portuguese and another category Software for English.
Create new article sNews to put in Portuguese Software, and new article sNews for English software.
...
I'll try to add this: when you search for software, appears all articles for software (a flag country add to each article), and when you click jump for that language. This can be disable if want.

When you create a new article (or edit) you can select a language. No click to translate (see example to understand).

cheers.
bye
« Last Edit: September 13, 2007, 10:22:51 PM by Rui Mendes »
Logged
Need a Job on Europe. Linkdin - Facebook / Group

Vasile Rusnac

  • Newbie
  • *
  • Karma: 7
  • Posts: 49
Re: [MOD] Multiple Languages
« Reply #26 on: September 14, 2007, 10:52:47 AM »

Hi Rui,

nice job, I think it looks better and better  ;)
I can say you provided a very good solutions for search results: the articles list with flags for each, thats awesome.

While, for the country flags to appear automatically you can use a script similar to a gallery population: there is a folder flags/ with several images in it (en.png, pt.png, fr.png) and the script populates all images in that folder in the desired place with link to &lang=imagename

one thing, though, is the language switch: whenever I click on a new language I am redirected to the frontpage. Users might wish to stay on the same page, for ex, sitemap, where they will have to navigate again.
Maybe <? echo ($_SERVER['PHP_SELF']); ?>?action=language&lang=pt will be a better solution? Just a thought.

Good luck in your Mod finishing, we will definitely wait for your release. Cheers.
Logged

Dobri

  • Newbie
  • *
  • Karma: 0
  • Posts: 4
    • http://dobri.biz
Re: [MOD] Multiple Languages
« Reply #27 on: September 14, 2007, 04:27:45 PM »

Hi,

very nice mod,but have a problem.

I'm testing Multiple Language version by Rui Mendes. A set a static page as homepage(Admin -> Settings -> Contents -> Use Page as Home Page -> ...some page..) on one of the languages and I need to set different static page as home page on any other  language, but it is not possible.

Can you help mi to solve this problem?

Thank you.
Logged

Rui Mendes

  • Development,Testing, Support
  • Hero Member
  • *****
  • Karma: 195
  • Posts: 1009
  • sNews1.7
    • Comunidade Portuguesa
Re: [MOD] Multiple Languages
« Reply #28 on: September 15, 2007, 02:02:51 PM »

Hello Dobri.

I never think about it, but I'll try to makes this happen.
Please wait, I'm very busy right now to solve some problems with this mod.
Be patient, I'm working alone with this.

Good weekend for all
Logged
Need a Job on Europe. Linkdin - Facebook / Group

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: [MOD] Multiple Languages
« Reply #29 on: November 10, 2007, 08:29:24 PM »

@ Rui... if you read this before you log out... stay tuned... I have a couple of questions to bring up... I will be back with them in this post in a few minutes.

I am working on a way to switch language files in my latest MEMU project revision. It has language files - english.php and french.php (for now) - in the root/languages folder and this is the same as I have it in the currently available MEMU download. These files have the complete language array structure in both of them as it was in the default sNews 1.6 package... but without the switch string in the top of them. I have been working with a modified version of bakercad's template switch script since it is small and simple, and I only wanted to switch the language variables. It is almost working, but not quite.

Then I had a look at this Mod you did for Multiple Language sites... downloaded your package... and identified all of the Language Mod locations in the snews.php file... about 44 of them not counting the language variables themselves.

I would like to try adding this Mod to my new MEMU project.
Question - are there any changes to the database?
Question - does an article need to be created and saved in each language so that articles display in each language when the site language changes?
« Last Edit: November 10, 2007, 08:36:36 PM by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU
Pages: 1 [2] 3 4