 | |  | | | Classifieds How do I...? Wondering how to do something in Classifieds? |
June 2nd, 2009, 04:16 PM
|
#1 (permalink)
| | Junior Member Verified Customer
Join Date: Jan 2009
Posts: 21
| Import personalized languages after upgrade to 3.12
How can I import my personalized languages to database without making all traduction work to Italian ?? |
| |
June 2nd, 2009, 04:41 PM
|
#2 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,809
|
You can do one of two things. Make an italian language in admin and set your global language to italian and then manually edit each language string in admin to italian or create your own language based on phrases.php for italian editing the text where noted in that file.
|
| |
June 2nd, 2009, 04:46 PM
|
#3 (permalink)
| | Junior Member Verified Customer
Join Date: Jan 2009
Posts: 21
|
I hoped there was an import tool or something similar...... I'll try to do it by myself |
| |
June 2nd, 2009, 05:06 PM
|
#4 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,809
|
Well import tool of what kind? One has to write an actual language translation before one can import it. There is an import tool of a kind. The default phrases.php file which contains an english translation of every string in our program
Here is a file I started to show you what to do rename it to italian.php Code: Content visible to verified customers only.
Notice in the phrases the first entry is what you translate
when your done editing the new italian.php you can upload it to your classifieds and run it then your done and have a new italian language.
|
| |
June 8th, 2009, 06:22 AM
|
#5 (permalink)
| | Junior Member Verified Customer
Join Date: Jan 2009
Posts: 21
|
Chuck,
I already traduced english file in italian for version 304, so I have an italian.php under my languages directory.
I made a little script to move these translations to db as there is a correspondence between $Globals['pp_lang'] variable and variable in db 
I have to check for new phrases, off course, but not to copy/past all languages
this is the script: Code: Content visible to verified customers only.
|
| |
June 8th, 2009, 11:23 AM
|
#6 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,809
|
You can do as you wish sure. I did something similar when creating 3.1 but remember you are not going to have all the strings needed when doing something like that since you where running an old version. You may only have half the langtuage strings needed to be successful. The only true way of doing it would be to translate a current 3.1X translation which is the way I posted translating the phrases.php file.
|
| |
June 9th, 2009, 04:48 AM
|
#7 (permalink)
| | Junior Member Verified Customer
Join Date: Jan 2009
Posts: 21
|
Off course, but in this way I don't waste all works done before
Sara
|
| |
June 9th, 2009, 11:04 AM
|
#8 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,809
|
Right but now you need to figure out what your missing. |
| |
October 1st, 2009, 02:36 PM
|
#9 (permalink)
| | Junior Member Verified Customer
Join Date: Mar 2007 Location: Duesseldorf, Germany
Posts: 28
|
Hi Chuck,
I try to translate classifieds via language editor and I'm really unhappy with this buggy thing.
Firstly, if you search something and the results are more than 1 page, the second page cannot displayed cause of jumping to main index.
Secondly, after changing (what for itself is challinging) an item the whole editior jumps to the beginning and you have painstaking to crawl back where you are.
Also for me not understanding that the editor cannot remember, how many items you wanted to list.
Please find a more convenient way in next releases.
Thanks.
Regards.
|
| |
October 1st, 2009, 02:54 PM
|
#10 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,809
|
Try redownloading the build and upload adm-lang.php and adm-inc.php
|
| |
October 1st, 2009, 04:12 PM
|
#11 (permalink)
| | Junior Member Verified Customer
Join Date: Mar 2007 Location: Duesseldorf, Germany
Posts: 28
|
Hi Chuck,
thanx for the immediate help. This works!
But I really would apprechiate to get back a XML-File for language import.
It would make it easier to share languages files within the community.
Regards,
Knut
|
| |
October 1st, 2009, 04:23 PM
|
#12 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,809
|
Well I use a php file phrases.php maybe if I actually look at xml and how it would work its possible in the future.
This is the initial work of making global language ability versus hard coded files and it brings in the ability to support any language so its a huge step forward in the program.
|
| |
October 1st, 2009, 08:38 PM
|
#13 (permalink)
| | Junior Member Verified Customer
Join Date: Mar 2007 Location: Duesseldorf, Germany
Posts: 28
|
Hi Chuck,
I found another one: If I change (translate) a phrase which contains html tags (like <br>) then this phrase will not shown correctly in browser. It might be saved wrong at database? The browser changes < in < etc. pp.
Any ideas?
Thanks in advance
|
| |
October 1st, 2009, 10:46 PM
|
#14 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,809
|
I beleive I responded to this already its not saving it wrong. natively we do not really allow html and things are saved a certain way to allow multiple language encoding.
|
| |
October 2nd, 2009, 06:09 AM
|
#15 (permalink)
| | Junior Member Verified Customer
Join Date: Mar 2007 Location: Duesseldorf, Germany
Posts: 28
|
Hi Chuck,
Yes, you replied here and thanks for that. It's a lot easier to add a line than changing a database...
Best regards,
Knut
|
| |
October 2nd, 2009, 08:19 AM
|
#16 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,809
|
Indeed
|
| |
August 10th, 2010, 12:21 PM
|
#17 (permalink)
| | Member Verified Customer
Join Date: Aug 2010
Posts: 58
|
Hi again, I want to import bulgarian language phrases. I used phrases.php as template and translated the first entries as advised above for italian. I saved it as bulgarian.php and uploaded it to the ppc directory.
I changed:
$query[] ="DELETE FROM {$pp_db_prefix}phrases WHERE langid=1;";
to
$query[] ="DELETE FROM {$pp_db_prefix}phrases WHERE langid=4;";
Then everywhere as advised:
from
$query[] ="INSERT INTO {$pp_db_prefix}languages VALUES (1, 'english', 'en', 'UTF-8', 'ltr');";
to
$query[] ="INSERT INTO {$pp_db_prefix}languages VALUES (4, 'bulgarian', 'bg', 'UTF-8', 'ltr');";
Then from:
$query[] = "INSERT INTO {$pp_db_prefix}phrases VALUES (1, 'admgrp1', 'Global Options', 'Global Options', '1');";
to
$query[] = "INSERT INTO {$pp_db_prefix}phrases VALUES (1, 'admgrp1', 'Общи опции', 'Global Options', '4');";
and so on.....every line.
Then I go to admin panel in ppc and run mydomain.com/ppc/bulgarian.php
After press "Proceed to Install Language Phrases" I get this error:
Error performing MySQL command: INSERT INTO cp_languages VALUES (1, 'english', 'en', 'UTF-8', 'ltr');
Error: Duplicate entry '1' for key 'PRIMARY'
What am I missing?
|
| |
August 10th, 2010, 12:44 PM
|
#18 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,809
|
You have apparently left that query in your custom bulgarian.php or maybe something even simpler. Have you renamed any forward links from phrases.php to bulgarian.php |
| |
August 10th, 2010, 12:52 PM
|
#19 (permalink)
| | Member Verified Customer
Join Date: Aug 2010
Posts: 58
|
What exactly is forward links?! I only changed first entries and ran a "find & replace" for the numbers, so it changes
'1');"; to '4');";
That's all. How can I test it? Maybe to run a search for some term or something else?
|
| |
August 10th, 2010, 01:01 PM
|
#20 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,809
|
do a search and replace in your bulgrian.php for phrases.php and replace with bulgarian.php
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 05:20 PM. | |