![]() |
Import personalized languages after upgrade to 3.12 How can I import my personalized languages to database without making all traduction work to Italian ?? :confused: |
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. |
I hoped there was an import tool or something similar...... I'll try to do it by myself ;) |
1 Attachment(s) 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.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. |
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 :cool: 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. |
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. |
Off course, but in this way I don't waste all works done before :rolleyes: Sara |
Right but now you need to figure out what your missing. ;) |
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. |
Try redownloading the build and upload adm-lang.php and adm-inc.php |
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 |
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. |
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 |
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. |
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 |
Indeed |
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? |
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 ;) |
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? |
do a search and replace in your bulgrian.php for phrases.php and replace with bulgarian.php |
| All times are GMT -5. The time now is 03:24 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0