Page 1 of 1

Phoca International Plugin

Posted: 08 Jul 2010, 15:11
by over
Hi,
I didn't find anything on this. And no documentation.

I'm trying from a long distance to help a bulgarian to make the J! component Gary's Cookbook cyrillic-compatible. I have no possibility to use those characters on my local system. Therfore I've to fake it. For the test I use your plugin with the goal not to support just bulgarian but also the other languages within your plugin. I think I understand the plugin.
It overrides the standard JFilterOutput class. True?
i.e $var = JFilterOutput::stringURLSafe($var)
translates the $var with cyrillic characters to 7Bit "english" characters.

To be used for an alias-field and for a "file-safe" string.

Now the problem. It seems that some characters are lost after the translation. I've tested with slovakian, croatian and other strings. I have absolutly no idea of the language itself. Just used the characters from your translation string.

Do you have any Idea?

Thanks in advance.
over

Re: Phoca International Plugin

Posted: 08 Jul 2010, 21:23
by Jan
Hi, didn't you find the original plugin for bulgarian made by Ivo Apostolov? Ivo made it for the bulgarian language so it should work without any problems?

Re: Phoca International Plugin

Posted: 10 Jul 2010, 23:56
by over
Hi Jan,
thanks for your reply.

First let me say I like your Phoca work. From your Phoca Gallery (that I have installed on a site) I got the Idea how to solve a installation/upgrade procedure. It is not a 1 to 1 copy but to some extent based on your idea.

I think the bulgarian plug in is only to find on a bulgarian speaking site or do you eventually know if Ivo Apostolov has a englishspeaking site as well? Well now I've got this plug in sent to me and this seems to work. But I would also like to be sure that your plug in can be used as well. As I wrote, with my tests I lost some characters there. Are you sure it works ok?

May I also ask you another question? As I think you're in the "cyrillic business" more than I am. I tried to enter cyrillic (bulgarian) characters in a Joomla! form and also directly from phpMyAdmin. My (utf-8) database do not except them. From the form I get ??????? ???? phpMyadmin doesn't except them at all. Obviously it's a little bit hard to test cyrillic characters from a distance but maybe you know something about this.

Regards
Ove

Re: Phoca International Plugin

Posted: 11 Jul 2010, 13:29
by Jan
Hi, the plugin only works for these languages:
https://www.phoca.cz/phoca-international-alias-plugin

Bulgarian was not added because it works in Ivo's plugin
I think you're in the "cyrillic business" more than I am
:( Sorry, I don't have any "cyrillic" experiences as in Czech we are using "latin" :idea:

Maybe try to see this script:
https://www.phoca.cz/documents/38-tools/ ... n-database

But really no idea if this can work with cyrillic (I think not, as the iconv can do problems).

BUT IF YOU WILL USE THIS TOOL, backup your database because it can change the strings to some not wanted output :-( :-(

Re: Phoca International Plugin

Posted: 12 Jul 2010, 15:19
by over
Hi Jan,
Thanks. :twisted:

Well I do not mix it up. The bulgarian plug-in for bulgarian and your plug-in for other languages according to your list, the plug-in settings and the code.

Though with your plug activated. I miss some characters by only counting them. To be sure, I now again tested with Czech and used your "translation string" i.e. the characters to translate from your code.
array('á','č','ď','é','ě','í','ň','ó','ř','š','ť','ú','ů','ý','ž','Á','Č','Ď','É','Ě','Í','Ň','Ó','Ř','Š','Ť','Ú','Ů','Ý','Ž');
Made a string of it.
'áčďéě íňóřš-ťúůýžÁČĎ' makes 20 characters with the blank and the hyphen. But I only get this back in the $alias from the plug in. 'ace-ios-uyz-ac' This makes 14 characters. 6 are missing. As you can see the 14 characters remaining are translated as they should. This has nothing with the database to do. I just echo the data after getting it back from your plug in. The original characters are still there in the title variable. So I thinks something is going wrong. :o

Changing to actived bulgarian plug testing with bulgarian characters I send 20 characters, as explained above, and get 21 characters back. Correct I think as one character is translated with two characters.
Sorry, I don't have any "cyrillic" experiences as in Czech we are using "latin"
Sorry for calling Czech cyrillic. :cry: You can alwas learn. :| I thought everything I can't read is of that kind.

I asked you about the database because I thougt maybe you now something about it. My local Xampp installation has some troubles with the characters. I now also tested to enter Czech characters. The same result. I tried to change the collation/charset. The same. Maybe there is some other setting somewhere. But lf not, we have to leave it to them who really needs it. Only as general interest. Would be 8) to know.

Regards Ove

Re: Phoca International Plugin

Posted: 16 Jul 2010, 14:18
by Jan
Hi, maybe there are only problems with some utf-8 function - on the server, in the script, etc. The plugin should be saved with utf-8 without BOM so there should net be problem, maybe try to test it :idea:

Re: Phoca International Plugin

Posted: 16 Jul 2010, 16:01
by over
Hi Jan,
maybe there are only problems with some utf-8 function - on the server, in the script, etc. The plugin should be saved with utf-8 without BOM so there should net be problem, maybe try to test it
I didn't change anything in the plug-in and didn't save it. i.e. the encoding should be ok. I just use it to translate a title for the alias. The translated title is also used as part of the image file names that may be uploaded. The solution is now live on a system in Bulgaria with the bulgarian plug in and I've got a message that it works If you give me a title of a nice czech recipe I'll give it another try.
It's all about a cookbook extension to Joomla! and we'll give a hint where the plug ins can be found and downloaded.

I'm in Sweden, using Xampp on Win7 localy for tests. Windows in german, other applications most in english some in swedish.

By the way. Nice to know? :!: I found my problem with the characters in the Joomla! database. As I made a quick new Joomla test instance I got it messed up somehow. The database were utf-8 allright but the table! I was testing with was in some latin-german2 and of course it didn't work.

Regards
over