I have a Drupal 7 project where I am using a Panel to patch together some Drupal blocks. These blocks have to be translated and I just added some data to the current French translation and apparently there is a limit to how much translated content you can have in a block because after I add the extra french content to the block and try to save I get an error that says: "The website encountered an unexpected error. Please try again later."
and going to the reports log I see:
PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'translation' at row 1: UPDATE {locales_target} SET translation=:db_update_placeholder_0 WHERE ( (lid = :db_condition_placeholder_0) AND (language = :db_condition_placeholder_1) ); Array ( [:db_update_placeholder_0] =>
[LOTS OF HTML MARKUP/TRANSLATION DATA HERE THAT I LEFT OUT FOR BREVITY]
[:db_condition_placeholder_0] => 16474 [:db_condition_placeholder_1] => fr ) in i18n_string_textgroup_default->save_translation() (line 747 of /home/master/public_html/sites/all/modules/i18n/i18n_string/i18n_string.inc).
The block contains HTML mixed with text and its pretty large, 72080 characters. I need it to be large because its a lot of text and I have HTML markup in it that works with some custom javascript I created.
Any idea how to get over this limit for the maximum amount you can translate in a block?
Here is the table that is being referenced and it looks like the field "language" is already a blob:
describe locales_target
in a MySQL prompt?t()
or the equivalent function implemented by the Internationalization module with a string containing JavaScript code.