Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

Форумы / Cotonti / Extensions / Content Internationalization (i18n) of Sienna

<<<123>>>

pieter
#16 28.07.2011 11:19

I reinstalled Siena without i18n.

When I try to install i18n I get: 

 

	Fatal error: SQL error 42000: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ADD COLUMN `tag_locale` VARCHAR(8) NOT NULL DEFAULT ''' at line 1
#0 cot_diefatal(SQL error 42000: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ADD COLUMN `tag_locale` VARCHAR(8) NOT NULL DEFAULT ''' at line 1) called at [/home/k3098kru/public_html/_subsites/sai_siena/system/database.php:436] #1 CotDB->query(ALTER TABLE ADD COLUMN `tag_locale` VARCHAR(8) NOT NULL DEFAULT '') called at [/home/k3098kru/public_html/_subsites/sai_siena/plugins/i18n/setup/i18n.install.php:20] #2 include(/home/k3098kru/public_html/_subsites/sai_siena/plugins/i18n/setup/i18n.install.php) called at [/home/k3098kru/public_html/_subsites/sai_siena/system/extensions.php:499] #3 cot_extension_install(i18n, ) called at [/home/k3098kru/public_html/_subsites/sai_siena/system/admin/admin.extensions.php:352] #4 require(/home/k3098kru/public_html/_subsites/sai_siena/system/admin/admin.extensions.php) called at [/home/k3098kru/public_html/_subsites/sai_siena/system/admin/admin.main.php:67] #5 include(/home/k3098kru/public_html/_subsites/sai_siena/system/admin/admin.main.php) called at [/home/k3098kru/public_html/_subsites/sai_siena/admin.php:25]

 

After this, plugin in running, but I can only see install. Not update, un-install, pause, ... http://www.cotonti.com/datas/users/i18n_64.png

... can we help you ...
Twiebie
#17 28.07.2011 13:46

Hmm, weird...

I just did a fresh Siena test install via the same steps as you posted earlier and it works fine here..

pieter
#18 28.07.2011 13:51

 

cPanel Version 11.28.52
Theme x3
Apache version 1.3.42
PHP version 5.2.9
MySQL version 5.0.91-community
Architecture i686
Operating system linux

 

... can we help you ...
Twiebie
#19 28.07.2011 14:33

For some reason I can't post an image with the CKEditor here..

But here are my server details:

http://www.twiebie.com/files/dump/server-info.png

Biggest difference would be the Apache version.

Trustmaster
#20 29.07.2011 21:02

I have fixed a misspelling that may cause this (fetch latest from git) error, but I haven't fixed i18n/tags install order in the installer script, it requries more complex dependency tracking than the current system.

May the Source be with you!
pieter
#21 03.08.2011 13:45

2011-08-03 13:44

Fatal error: SQL error 42000: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ADD COLUMN `tag_locale` VARCHAR(8) NOT NULL DEFAULT ''' at line 1

#0  cot_diefatal(SQL error 42000: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ADD COLUMN `tag_locale` VARCHAR(8) NOT NULL DEFAULT ''' at line 1) called at [/home/k3098kru/public_html/_subsites/broens/system/database.php:436]
#1  CotDB->query(ALTER TABLE  ADD COLUMN `tag_locale` VARCHAR(8) NOT NULL DEFAULT '') called at [/home/k3098kru/public_html/_subsites/broens/plugins/i18n/setup/i18n.install.php:20]
#2  include(/home/k3098kru/public_html/_subsites/broens/plugins/i18n/setup/i18n.install.php) called at [/home/k3098kru/public_html/_subsites/broens/system/extensions.php:499]
#3  cot_extension_install(i18n, ) called at [/home/k3098kru/public_html/_subsites/broens/system/admin/admin.extensions.php:352]
#4  require(/home/k3098kru/public_html/_subsites/broens/system/admin/admin.extensions.php) called at [/home/k3098kru/public_html/_subsites/broens/system/admin/admin.main.php:67]
#5  include(/home/k3098kru/public_html/_subsites/broens/system/admin/admin.main.php) called at [/home/k3098kru/public_html/_subsites/broens/admin.php:25]

How can I solve this?
... can we help you ...
Trustmaster
#22 06.08.2011 19:41

Please check the latest revision from github, this problem is already solved there.

May the Source be with you!
pieter
#23 07.08.2011 05:42

Now it works perfect, even if you install it upon installation of cotonti.

Added 3 minutes later:

But on index, news-title is changed but text isn't.

If I click on de news to open as a page, the right text is displayed.

See: http://broens.be/index.php

Added 9 minutes later:

Also Recent Items is not doing what it should do.
Titles are not translated.

... can we help you ...

Отредактировано: pieter (07.08.2011 05:55, 10 лет назад)
Trustmaster
#24 07.08.2011 07:52

I'll check the news plugin. As for Recent items, it has no i18n support yet.

Добавлено 10 часов спустя:

I've found the reason. I18n for news interferes with page cache generated by recentitems. So if i18n support is added to recentitems, news will work as well.

May the Source be with you!

Отредактировано: Trustmaster (07.08.2011 17:59, 10 лет назад)
foxhound
#25 01.06.2012 11:18

I am trying to use this for the first time on a clean Sienna 0.9.9 installation and i am a bit confused how to get this to work with pages.
I got it to work so far that if you select the English flag the site shows in all English (default text fields) and when you select the Dutch flag the entire site (the default fields) are displayed in dutch.

I created 2 news items from which one in English and one in Dutch with a stucture like this:

1 en English
1.1 en-news News
2 nl Dutch
2.1 nl-news Nieuws

No matter what I do, the dutch news item does not show in the news on the index.php. It only shows when I add {INDEX_NEWS_NL_NEWS} to the index.php. But than it will always show (no matter if you select to view the Dutch or the English site).

I added the following to my urltrans.dat:
page    al=*    {pagi18n_url()}

This is showing an error as well every time: "Alert! this line contains callbacks: {pagi18n_url()}
No idea what that means.

I added the following to my htaccess:

Options FollowSymLinks -Indexes
# Server-relative path to Cotonti:
RewriteBase "/testers/xxxxxxxxx/"
RewriteRule ^(datas|images|js|themes)/(.*)$ $1/$2 [QSA,NC,NE,L]

# Pages with aliases only
# Language selector
RewriteRule "^(en|nl)/(.*)?(.*)$" $2?$3&l=$1
RewriteRule "^(en|nl)/(.*)" $2?l=$1


I am pretty sure I am doing something dumb but I just do not fully understand the instructions on the downloadpage and here in this thread (which to me look different as well which is causing more confusion.
Any help with this? 

laugh

 

<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />

Отредактировано: foxhound (01.06.2012 11:55, 9 лет назад)
Trustmaster
#26 01.06.2012 11:57

foxhound, i18n works in an absolutely different way in Siena rather than pagi18n plugin from Genoa. You don't need to create alternative cat trees, but rather translate the main one.

Here are the essential steps:

  1. Go to Administration / Configuration / Content Internationalization.
  2. Set there root categories where you want to apply i18n, e.g. "articles, news".
  3. Set there locales it will be translated into (the first locale is the main one): 
    en|English
    nl|Nederlands
    de|Deutsch
  4. Go to Administration / Structure / Pages / Structure Internationalization and translate category names and descriptions into each of your (non-main) locales.
  5. Add these controls to your page.tpl
    <!-- BEGIN: I18N_LANG -->
    {PHP.L.Language}:
    <ul>
    	<!-- BEGIN: I18N_LANG_ROW -->
    	<li><a href="{I18N_LANG_ROW_URL}">{I18N_LANG_ROW_TITLE}</a></li>
    	<!-- END: I18N_LANG_ROW -->
    </ul>
    <!-- END: I18N_LANG -->
    {PAGE_I18N_TRANSLATE} {PAGE_I18N_DELETE}
  6. Now if you open a page from one of the category trees you specified in 2) you can click "Translate" and translate into one of the other locales.
  7. If you need a language selector in your header.tpl, here is what it might look like:
    <!-- BEGIN: I18N_LANG -->
    <ul>
    	<!-- BEGIN: I18N_LANG_ROW -->
    	<li>
    		<a href="{I18N_LANG_ROW_URL}" title="{I18N_LANG_ROW_TITLE}"><img src="images/flags/{I18N_LANG_ROW_FLAG}.png" alt="{I18N_LANG_ROW_CODE}" /></a>
    	</li>
    	<!-- END: I18N_LANG_ROW -->
    </ul>
    <!-- END: I18N_LANG -->

That's it.

May the Source be with you!
foxhound
#27 01.06.2012 12:57

Wow, I am so sorry. Now I understand why I felt like an idiot trying to make this work. This is so very easy to use now you explained it, thanks for the help (again) Trustmaster!

It is working now and I must say, this is incredibly perfect! This opens up many new possibilities for any site I am running or will run in the future. Although I am still not moved to Sienna for my live websites this too only makes me want to hurry things up (but working on numerous new projects is not helping with the hurry).

<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
Trustmaster
#28 01.06.2012 18:46

You're welcome. I've saved these notes in a quick help doc, because I often repeat them here on forums.

There's no need to hurry, better get things right. That's why Genoa is still here.

May the Source be with you!
Uch
#29 11.02.2014 17:26

Hello!

I need some help please!

I cant get the admin page www.sitename.com/en/admin when i use i18n and URL Editor with handy mode. The other admin pages (for example www.sitename.com/en/admin/extensions or www.sitename.com/en/page?m=add&c=articles) work fine. But if i try to get www.sitename.com/en/admin i get error:"One of the request parameters is invalid or has expired. Please go back and try submitting the form again. "

I have RewriteRule ^(en|ru|de|nl)/(.*) $2?l=$1 [QSA,NC,NE] line in my .htaccess

 

 

Trustmaster
#30 12.02.2014 10:39

Uch, this is usually caused by Options directive in .htaccess, because it is hosting-dependant. Try different combinations of Options like, -Indexes, +Indexes, -FollowSymLinks, +FollowSymLinks.

May the Source be with you!

<<<123>>>