Using most Recenter Version, problem with \N
8 years 7 months ago - 8 years 7 months ago #1431
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Using most Recenter Version, problem with \N
Hi,
Initially I2 Localization had support for excel files. However it was a bit unstable as it depended on the Office version installed in the device (if any) and wasn't supported on Mac (I added a version with the open office format, but there were too many versions to support and users were getting confused on what versions worked and which didn't.
So, excel files (as .xls) are not supported directly. However, excel opens csv files directly and allows saving to csv.
At the end, reading .xls will get the same data to I2 Localization than reading csv.
However, by re-reading your initial post. I see that you issue is importing csv files.
If your csv files have \n they are not set correctly.
To handle multiple lines the text should be surrounded by quotes (") and then you add line breaks instead of \n
for example:
instead of: Line1\nLine2
it should be: "Line1
Line2"
Here is an example csv file I generated in Excel (by clicking Save As... and selecting csv as the format)
This csv file imports correctly in I2 Localization:
It has a term named "This is a red car."
with English, Spanish and French
And english has two lines:
Hope that helps, and PLEASE, if you need support in setting up your project, send me a version of your csv file and allow me to fix it for you.
Or make a test project that shows your issue and I will be able to give you precise instructions of whats wrong on how to fix it.
Thanks
Frank
Initially I2 Localization had support for excel files. However it was a bit unstable as it depended on the Office version installed in the device (if any) and wasn't supported on Mac (I added a version with the open office format, but there were too many versions to support and users were getting confused on what versions worked and which didn't.
So, excel files (as .xls) are not supported directly. However, excel opens csv files directly and allows saving to csv.
At the end, reading .xls will get the same data to I2 Localization than reading csv.
However, by re-reading your initial post. I see that you issue is importing csv files.
If your csv files have \n they are not set correctly.
To handle multiple lines the text should be surrounded by quotes (") and then you add line breaks instead of \n
for example:
instead of: Line1\nLine2
it should be: "Line1
Line2"
Here is an example csv file I generated in Excel (by clicking Save As... and selecting csv as the format)
This csv file imports correctly in I2 Localization:
It has a term named "This is a red car."
with English, Spanish and French
And english has two lines:
Key,Type,Desc,English,Spanish,French
This is a red car.,Text,,"Line 1
Line 2",linea,linea
Hope that helps, and PLEASE, if you need support in setting up your project, send me a version of your csv file and allow me to fix it for you.
Or make a test project that shows your issue and I will be able to give you precise instructions of whats wrong on how to fix it.
Thanks
Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
To get the betas as soon as they are ready,
check this out
Last edit: 8 years 7 months ago by Frank.
Please Log in or Create an account to join the conversation.
8 years 7 months ago #1432
by Frank
It maybe an issue with the encoding. Google could be saving it in a non UTF8 format. And that could make the csv look as corrupted when opened in some viewer.
However, I2 Localization when importing CSV files allows you to select which encoding to use. So, you could check which encoding is used in the CSV and select it when importing to I2L. That will make it load correctly.
Another way (if you need to have a csv to upload to your servers or edit locally) is to make I2 Localization connect to Google, download the spreadsheet and then export the CSV file for you.
Hope that helps,
Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Using most Recenter Version, problem with \N
This does not works when updating the Language from CSV instead of Google Drive. The CSV gets corrupted when exported from Google Docs to CSV.
It maybe an issue with the encoding. Google could be saving it in a non UTF8 format. And that could make the csv look as corrupted when opened in some viewer.
However, I2 Localization when importing CSV files allows you to select which encoding to use. So, you could check which encoding is used in the CSV and select it when importing to I2L. That will make it load correctly.
Another way (if you need to have a csv to upload to your servers or edit locally) is to make I2 Localization connect to Google, download the spreadsheet and then export the CSV file for you.
Hope that helps,
Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
To get the betas as soon as they are ready,
check this out
Please Log in or Create an account to join the conversation.
8 years 7 months ago #1469
by SimonAL
Replied by SimonAL on topic Using most Recenter Version, problem with \N
Hi... I have a similar problem working with txt/csv.
I'm using a normal line break (Enter). Since we have 2000 terms to be localized in 12 languages its obvious that we export the stuff to Excel... translate and import back. But there is a problem. I'm outputting here one section of the Excel:
As can be seen, the term 389 (ChooseProduct) gets split into 3 lines, making it harder to edit. Immagine all 12 languages split across 24 rows...
So the excel importer uses line breaks to separte the actual lines and it seems that it does not care about the "".
And I wonder how can be this properly imported back.
Any toughts about this problem?
I'm using a normal line break (Enter). Since we have 2000 terms to be localized in 12 languages its obvious that we export the stuff to Excel... translate and import back. But there is a problem. I'm outputting here one section of the Excel:
As can be seen, the term 389 (ChooseProduct) gets split into 3 lines, making it harder to edit. Immagine all 12 languages split across 24 rows...
So the excel importer uses line breaks to separte the actual lines and it seems that it does not care about the "".
And I wonder how can be this properly imported back.
Any toughts about this problem?
Please Log in or Create an account to join the conversation.
8 years 7 months ago #1476
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Using most Recenter Version, problem with \N
Hi,
I just tried exporting from I2Languages.prefab to a csv and double clicking in the csv file so that Excel opens it.
That worked just fine: everything with several lines was in the same cell as expected.
Then, I tried exporting to txt (as you mentioned "txt/csv"), then, opened Excel with a blank spreadsheet and used the "Import from Text" button to read the txt file. That failed in a similar way as you described.
Excel has native support for csv file, but given that txt files can have any format, it tries to detect thing and fails.
So, I guess that's the same issue you are having.
A solution:
- Export directly to csv and double click it to open in excel, or once excel is open, select Open... to load the csv file, not "Import..."
If for any reason, you have to export to txt, just rename the file to .csv and open that with excel.
If that's not your case, can you please send me a CSV file exported from I2Languages.prefab, that I could test in Excel and verify the problem.
Thanks!
Frank
I just tried exporting from I2Languages.prefab to a csv and double clicking in the csv file so that Excel opens it.
That worked just fine: everything with several lines was in the same cell as expected.
Then, I tried exporting to txt (as you mentioned "txt/csv"), then, opened Excel with a blank spreadsheet and used the "Import from Text" button to read the txt file. That failed in a similar way as you described.
Excel has native support for csv file, but given that txt files can have any format, it tries to detect thing and fails.
So, I guess that's the same issue you are having.
A solution:
- Export directly to csv and double click it to open in excel, or once excel is open, select Open... to load the csv file, not "Import..."
If for any reason, you have to export to txt, just rename the file to .csv and open that with excel.
If that's not your case, can you please send me a CSV file exported from I2Languages.prefab, that I could test in Excel and verify the problem.
Thanks!
Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
To get the betas as soon as they are ready,
check this out
Please Log in or Create an account to join the conversation.
Time to create page: 0.151 seconds