How to translate language packs in SocialEngine

232 Views Asked by At

I know that SocialEngine stores language files as CSV files in application/languages. The common format in the CSV files is as follows:

"Source word"; "Translated word"

But, this sometimes gets very complicated, especially when special characters are used in some parts, e.g.:

"Total Credits : %s";"Total Credits : %s"
"_EMAIL_SITEGROUP_BADGEREQUEST_APPROVED_EMAIL_TITLE";"Group Badge Request Approved"
"Video conversion failed. Please try uploading %1$sagain%2$s.";"Video conversion failed. Please try uploading %1$sagain%2$s."
"{item:$subject} replied to a comment on {item:$owner}\'\'s page offer {item:$object:$title}: {body:$body}";"{item:$subject} replied to a comment on {item:$owner}\'\'s page offer {item:$object:$title}: {body:$body}"
"3%s Level Category:";"3%s Level Category:"
"I have read and agree to the <a href='javascript:void(0);' onclick=window.open('%s','mywindow','width=500,height=500')>terms of service</a>.";"I have read and agree to the <a href='javascript:void(0);' onclick=window.open('%s','mywindow','width=500,height=500')>terms of service</a>."
2

There are 2 best solutions below

1
Ajit T Stephen On

Without worrying about any of that, you can use this plugin: Language Translator / Multilingual Plugin

0
Iefimenko Ievgen On

%s -this is variable, and this means vareables are few: %1$, %2$s and so on... any number in X: %X$

This is the key (in your case):

"Total Credits : %s"

This is delimeter:

;

and this is your translation:

"Total Credits : %s"

Cheers;)