Loading...
 
Multilingual/i18n

Multilingual/i18n


i18n not changing automatically to the desired language

posts: 27 Indonesia

Hi all:

I'm trying to setup multilanguage i18n into my TW14.0, but somehow I can't get TW to automatically show the translated pages automatically, so I guess some setting still needs work out.

We want to have the menus and system messages in English, and TW content in English or Indonesian, depending on Users Preferred language

Some pages are already translated, and have the 2 versions, but system does not show automatically the preferred version depending on User's preference

In any random wiki page we have Title of English Page, but TW does nto redirect users with preferred language = Indonesian if translated version Indonesian Version Page is available.

tiki-user_preferences.php?userId=XXX

  • Some users have Preferred Language = Indonesian and some Preferred Language = English


at tiki-admin.php?page=i18n

  • Default Language = English
  • Multilingual = ticked
  • Detect browser language = NOT ticked (we do not want it, as some users have the wrong setting here).
  • Show pages in user's prefered languages = Ticked
  • User can change site language = Ticked
  • Restrict supported languages = Ticked
  • Available languages = Indonesian and English
  • Display available translations = Ticked


As suggested in https://doc.tiki.org/i18n+Admin#Configuration User Preferences Screen is ticked.

So, I guess some setting is not properly set, but have no clue which one.

Any idea what could be wrong?

posts: 8632 Israel

Hello Tehona,

I’ll be glad to help, but can your provide a url for me to check ?
You can send it to me in private.

Bernard


posts: 27 Indonesia

Hi Bernard:

It's a company intranet not allowing anonymous access. Please let me know which kind of access should I prepare (which permissions would you need) and I will prepare an account for you.

trying to send a private message but I should allow messages from other users first. When I click on the link to https://tiki.org/tiki-user_preferences.php it does not work. Browser shows error ERR_EMPTY_RESPONSE. I will try to sort it out this as well...


Thanks,
Pak


posts: 8632 Israel

Hi Pak,

I won’t see much as registered.
Only Admin can set or interact with multilingual setting.

If this is too complicate, why not set on a public system a sample for us to work together ?

Thanks for reporting the issue at about tiki-pref...
Use my email from here : https://tiki.org/user1974

Bernard


posts: 27 Indonesia

Hi Bernand:

Will try to copy the system in an open enviroment with public info and come back. Not sure how to create a clone of the system. Will work on it and come back asap.

Thanks,
Pak


posts: 1563 Germany

Hi Pak,

a clone is easy:

First dump the database (= make a backup)

Commandline ...

Copy to clipboard
:$ mysqldump -u'something' -p'something etcetera > mybackup_thisdb_%Y%m%d_&H%M.sql

... depending on your operating system, your distribtion, your sever settings.

or with an export with phpMyAdmin, if the database is not so big (ex. no images stored in the database etc.)

Second create a new empty database where ever you want and import the previously made databasedump

Commandline ...

Copy to clipboard
:$ mysql -u'something' -p'something etcetera < mybackup_thisdb_20160331_1556.sql

... depending on your operating system, your distribtion, your sever settings.

or with an import with phpMyAdmin, if the database is not so big (ex. no images stored in the database etc.)

Third

Either copy the whole Tikiroot (only if on on the same server) to another directory which will get a new subdomain. MIND to change the database credentials in ~/newtikiroot/db/local.php !!!

Or make a fresh checkout of the same version (or download a release, if you are not familiar with svn and commandline) and poit a subdomain to the new checked out Tikiroot.

With the fresh checkout go to subdomain.example.com/tiki-install.php and quickly click though it, including providing the database credentials (of the new db!) and perform the database upgrade.

Lock and enter.
Then create Bernards user account.

I am not 100% sure if we are talking abut a fresh development version or a productive intranet.

Please mind, that in case you have some kind of agreement of non-disclosure or dataprotection procedures, respectively confidential data in the intranet, that you have to delete users and confidential data first, before you give away access. You cannot freely copy the intranet publicly if it is a company or another organisation. Otherwise you might endanger your job. If you are not sure, discuss with your boss, before you proceed.

Giving an external consultant access to database is one thing ... I absolutely trust every single project admin and Bernard is one. But cloning a company intranet from a firewall to a public space to give somebody externally (no matter if Bernard or myself) access would be kind of something .... I mean if I would be your boss and it would be a productively used I would sack you for that without notice to the instant date.

So only do that if you are sure, that it is YOUR data, you are the boss, you can take the responsibility.

posts: 27 Indonesia

Hi Bernard and Torsten:

I managed to copy the DB into a new DB, copied all exiosting Tiki files into a new folder, changed the credentials at local/db.php and run www.mydomain.com/NEWtikifolder/tiki-install.php
Typed the credentials of the new DB and found this error:

Fatal error: Cannot redeclare class Tiki_Security_Policy in /home4/myuserid/public_html/mydomain.com/OLDtikifolder/lib/init/smarty.php on line 89

Funny thing, error is pointing to OLD fodler (where the production site is running), not the NEW one. So somehow the new installed version is still looking for some hard setting somewhere pointing to the real site, not this test one.

I also changed the .htaccess RewriteBase /NETtikifolder but still looking into the wrong place.

What could it be? Many things not working as supposed, something must be bad or corrupted somewhere...
Privacy:

Yes, I'm fully aware of data disclosure risks. That's why I want to create a clone site but with much less info in it, so I don't run any risk about information leakage :-) But thanks for double checking it!!!

Regards,
Pak

posts: 1563 Germany

Manually delete the cache:

/temp/cache

Delete the content of the cache folder, NOT the cache folder itself.

If there is a folder ".svn" inside, do not delete this folder, but all the other files in /temp/cache

Reload the browser window - it should work now.
If not, there are a number of other cache folders to be emptied, but this one should be enough.

Regards,
Torsten

posts: 27 Indonesia

Hi Bernand and Torsten:

Copied all the TW files to NEW folder.
Copied the DB into a new DB and created new credentials.
Changed the credentials at db/local.php
Manually deleted the cache and it worked :-)

Almost. :-(

As example: On the new installation:
- the editor is not accesible (no editor at all),
- the icons in tiki-admin.php page look different,
- the theme can not be changed (all other themes, except the one from teh OLD installation do not work OK), etc.

I was already having on the installation in production already problems with:
- Category permissions acting funny (or not as expected).
- some users have to write the username and password twice to get access to the system. Others just once (as it should).
- i18n issues as TW is not selecting the right translation automatically

For the last days I have been discovering problems but not being able to fix any. Everything seems to be wrong or at least not-right (I inherited this installation few weeks ago, from an employee who set it up in the last months. Resigned and left me with the hot potato).

Not sure if it's better to fix this installation or start from scratch again

- Fix it: No clue of what's wrong or what's right. No clue if it's fixable in a reasonable timeframe.
- Start from zero again sound like many hours and I should be 100% sure I could alter on import all TW wiki pages and articles at least in an easy way.

Do you think it's fixable? Or better start again?

Thanks, Pak


posts: 8632 Israel

Hi Pak,

May be for a start and to avoid security concerns let’s work on a brand new tiki (new db install) so we can check together the setting only ?

Can be a bug can be a setting, better we check this and then we’ll try to understand what is going on on your intranet.

Bernard

posts: 27 Indonesia

Hi Bernard:

I think that if I start from a brand bew TW install, it will work OK. The issue is that something is not right at my installation, because of all these weird issues. That's why I'm trying to replicate the situation as much as possible, and a new install would not represent the problems

Thanks,
Pak

posts: 1563 Germany

Maybe it's the time to check with a temporary admin access.

=> if yes, then private message to Bernard and me

I'd have a quick go through late night.

T.


posts: 27 Indonesia

Finally after many tests I decided to start from scratch again.
I setup a new installation and copied the contect from the old installation (except the permissions, that were re-set manually).
Now it works perfectly.
So, permissions were all messed up and prevented TW to work as expected.
How we did get to this messy state? No clue :-(

I attach one SQL file we used to transfer content from old messy DB to a new one, might it help someone.

Many thanks to Torsten and Bernard!!!

Regards,
Pak


Upcoming Events

1)  21 Mar 2024 18:00 GMT-0000
Tiki Roundtable Meeting
2)  25 Mar 2024 17:00 GMT-0000
29th anniversary WikiBirthday (With Ward Cunningham)
3)  18 Apr 2024 18:00 GMT-0000
Tiki Roundtable Meeting
4)  16 May 2024 18:00 GMT-0000
Tiki Roundtable Meeting
5)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
8)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9) 
Tiki birthday
10)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting