Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Cant import my custom .po language file Rate Topic   - - - - -

 
  • noneart
  • Newbie
  • Trial users
  • Join Date: 20-Sep 13
  • 4 posts

Posted 13 October 2013 - 04:58 PM #1

I tried to add new language in Admin panel. But have a problem. For the first. There is no way to add new language without PO-file. So i decided to export current language from admin panel to my hard drive. Then i translated all this file. checked it for errors with msgfmt util.

After that i click on "Add language" button. Selected my "et.po" - Attached File  et.txt   557.57KB   8490 downloads - installation is successful. My new language appers in the list of languages.
But strings are untranslated. Why?
I did all translation of all the strings, but my new language all strings are copied from site's default language.

In documentation I found no information about translation for developers. So I need help to solve my problem.
How can i import my PO file correctly?

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11248 posts

Posted 14 October 2013 - 07:07 AM #2

What is a .po file? Imports in cs-cart are usually either .sql or .csv format.

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • noneart
  • Newbie
  • Trial users
  • Join Date: 20-Sep 13
  • 4 posts

Posted 14 October 2013 - 10:53 AM #3

What is a .po file? Imports in cs-cart are usually either .sql or .csv format.


.po is gettext translation text format.
Adminustration / Languages / Manage languages:
Posted Image

click "Add language button":
Posted Image

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11248 posts

Posted 15 October 2013 - 02:52 AM #4

Thanks, learn something new every day. So they no longer provide languages in SQL format so you can just "restore" into the language_values table?

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11248 posts

Posted 15 October 2013 - 03:02 AM #5

In reading your post a bit closer and looking at the code a bit, I would have to assume that you have some kind of incompatibility with your file. I.e. the variable names are not correct (match what exists) or you have some kind of syntactical error within the data itself. Have you checked your php error_log to ensure you're not throwing an error? What happens if you do just one lang var for your language to some name like "xxx"?

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • kmolchanov
  • CS-Cart team
  • Join Date: 06-May 11
  • 1313 posts

Posted 18 October 2013 - 07:43 AM #6

But strings are untranslated. Why?


Hello,

Translation terms must be separated with an empty line, and another empty line must be placed at the end of the file.

For example, here's an excerpt from your translation:

#. Status for orders with failed fraud review
msgctxt "Languages"
msgid "2co_fraud_fail"
msgstr "Staatus tellimusi ei pettuse läbi"
#. Status for orders waiting for fraud review
msgctxt "Languages"
msgid "2co_fraud_wait"
msgstr "Staatus tellimuste ootab pettuse läbi"

Here's how it should be:
#. Status for orders with failed fraud review
msgctxt "Languages"
msgid "2co_fraud_fail"
msgstr "Staatus tellimusi ei pettuse läbi"

#. Status for orders waiting for fraud review
msgctxt "Languages"
msgid "2co_fraud_wait"
msgstr "Staatus tellimuste ootab pettuse läbi"


In documentation I found no information about translation for developers. So I need help to solve my problem.


We haven't published a doc on PO translations yet, but it's in progress.

Thanks!

Konstantin Molchanov,
CS-Cart Architect Team
Suggest and vote for new features | Report a bug


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11248 posts

Posted 18 October 2013 - 09:06 PM #7

Good info to know. Seems like a pretty "sensitive" format. Just curious why the sql format (or CSV like the rest of the store) isn't applicable? I can see the multi-byte issues being problematic in CSV, but SQL should be fine. What advantage did this change bring?

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • MrBero
  • Newbie
  • Trial users
  • Join Date: 23-Jun 12
  • 7 posts

Posted 23 October 2013 - 08:13 PM #8

How can I import my old (from 3.5 version)  translated (sql, csv) files to 4.2 ?

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11248 posts

Posted 23 October 2013 - 10:21 PM #9

I think you can just export/import the cscart_language_values table
There is a new field added from V4.0 for "original value" but I do not believe it is required for anything other than for convenience when translating many languages from the same "base" translation.

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • dmitriy
  • Newbie
  • Trial users
  • Join Date: 25-Oct 12
  • 4 posts

Posted 22 November 2013 - 01:12 PM #10

I've the same issue, is anybody know how to import custom *.po?

 
  • fleaffair
  • Senior Member
  • Members
  • Join Date: 11-Jun 14
  • 537 posts

Posted 01 August 2017 - 06:13 PM #11

I've the same issue, is anybody know how to import custom *.po? 
 
  •  

Warm Regards,
Admin | MVE: 4.2.4

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19044 posts

Posted 02 August 2017 - 04:31 AM #12

 

I've the same issue, is anybody know how to import custom *.po? 
 
  •  

 

 

It is possible to do it when you create new language 

 

http://prntscr.com/g39pae

 

or update current one (default .po file should be updated in this case)

 

http://prntscr.com/g39php


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.