Forums / Cotonti / Extensions / i18N - Multilanguage

News on index page

pieter
#1 2009-11-17 01:58
Hello Trustmaster,

Can this be used for index news also?
I only get it to work for categories that are not NEWS-items.

It was already asked in comment of the plugin, but I did't find any anwser.
For the rest it is great.

If someone else knows the anwser, pls tell me.
... can we help you ...
Oughtem
#2 2009-11-20 07:51
Question for Lombi.

At a forum you showed multilanguage a site by which you did http://www.adriaticclub.com/

What did you do, what at you to be translated the MAIN PAGE too? You can show structure and that that is registered in.htacess and ultrans.dat?

Оn this site am two index.tpl:
http://www.adriaticclub.com/hr/index.php
and
http://www.adriaticclub.com/si/index.php

How to do 2 index.tpl?
Help please. In advance thanks.
This post was edited by Oughtem (2009-11-20 09:15, 14 years ago)
ez
#3 2009-11-20 16:12
Q: Why not make 1 extra field in the databases (e.g. articles and forums) for language..

And integrate this language thing into the core.
There are a lot off sites out there that need to be multilanguage.

I really think this should be in the standard cotonti.
1 setting in the configuration: multiple languages Yes/No

Every select should be rewritten to filter the languages..
==- I say: Keep it EZ -==
Oughtem
#4 2009-11-20 16:24
I will make attempt create header.tpl and index.tpl for every category (for every language) separately and it is simple to prescribe references in them
pieter
#5 2009-11-20 16:54
I got some help from Kilandor.
You can use more then one category for the news.

See config of the news-plugin.
http://www.yoursite.com/admin.php?m=config&n=edit&o=plug&p=news

Main (first) news category is displayed on main page using {INDEX_NEWS} tag in index.tpl.
Other news categories are displayed on main page using {INDEX_NEWS_CATEGORYCODE} tag in index.tpl. Use news.categorycode.tpl file(s) to customize appearance of each news category.


<!-- IF {PHP.lang} == "nl" -->
{INDEX_NEWS_CATEGORYCODE_NL}
<!-- ENDIF -->  
<!-- IF {PHP.lang} == "en" -->
{INDEX_NEWS_CATEGORYCODE_EN}
<!-- ENDIF -->

For the menu in 2 languages I used this:

			<!-- IF {PHP.lang} == "nl" -->
				{PHP.cfg.freetext1}
			<!-- ENDIF -->  
			<!-- IF {PHP.lang} == "en" -->
				{PHP.cfg.freetext2}
			<!-- ENDIF -->
... can we help you ...
Oughtem
#6 2009-11-20 19:29
Cool! All ingenious is simple! I am will try.

By the way, why at German language 2 codes are used: "nl" and "de"?
pieter
#7 2009-11-20 19:50
NL is not german, it is Dutch
DE is German
... can we help you ...
Oughtem
#8 2009-11-21 05:42
Unfortunately plagyn n18 does not change the variable of language on the page of index.php But it perfectly does plagyn langselect.
It is here possible to look as languages are commuted. On all site except for index.php switching takes place by n18, and on index.php it is possible to be perfectly commuted by langselect.

Here what outputs I see:

1. to compel to work n18 in index.php - did not turn out;(

2. it is correct to prescribe in header.php


<!-- IF {PAGE_URL} = 'index.php' -->
	{PLUGIN_LANGSELECT}
<!-- ELSE -->
   	 <!-- BEGIN: LANG_ROW -->
        <a href="{LANG_ROW_URL}" class="{LANG_ROW_CURRENT}" title="{LANG_ROW_NAME}">{LANG_ROW_FLAG}</a>&nbsp;&nbsp;
    <!-- END: LANG_ROW -->
<!-- ENDIF -->


it did not also turn out ;(

3. To create header.index.tpl separately for index.tpl langselect will work in which. An ordinary header with n18 will work in all the other places. Did not turn out also ;((

4.To unite langselect and n18 in one plagyn. This I am not able)

I most like variant with logical blocks

On the site of http://www.adriaticclub.com/ by the way translation is carried out not on index.php, and on page and list
This post was edited by Oughtem (2009-11-21 05:52, 14 years ago)
ez
#9 2009-11-21 05:53
Hi you ALL

Thanks to Pieter I found a serious bug in the language selector.
You can download a new language selector 104 from : http://ezscript.2basix.nl/page.php?id=33

This will solve some strange things when switching from pages and languages..

Please TEST it for me... I currently do not have a multilanguage site to test with

and let me know if it works !!!!!


Ow forgot to mention (please remove ALL langselect cookies from your browser before you test !!)
==- I say: Keep it EZ -==
pieter
#10 2009-11-21 20:32
I tested it, but I looks like the langselect doesn't interact with i18n-plugin.

langselect changes the lang for menus
code for i18N does do it for the page-structure.
<div id="lang">
	<!-- BEGIN: LANG_ROW -->
		<a href="{LANG_ROW_URL}" class="{LANG_ROW_CURRENT}" title="{LANG_ROW_NAME}">{LANG_ROW_CODE}</a>
	<!-- END: LANG_ROW -->
</div>
... can we help you ...
ez
#11 2009-11-21 23:14
I have seen it, and will try to fix this...

a location.reload in JS does not trigger the rewriterules... :(

I have a plan to get the browser url and then replace the language part with the new selected language and do a location.href=..... to the new url.

but need to work this out..

Maybe someone has a better idea to trigger the rewriterules from js ????
==- I say: Keep it EZ -==