There are various settings in Facet API where users can submit custom strings. Currently there is no mechanism in place to translate the strings. In an effort to avoid tight coupling with the i18n module inside of the core Facet API module, there should be a generic translation function that allows a contrib to interact with the strings and translate them via their native mechanism. By separating this out, an isolated contrib can be maintained to decouple it's release schedule from core Facet API so it can innovate at it's own pace.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | facetapi-1376786-6.patch | 11.33 KB | cpliakas |
| #6 | facetapi-1376786-5.patch | 11.36 KB | cpliakas |
| #4 | facetapi-1376786-4.patch | 11.32 KB | cpliakas |
| #2 | facetapi-1376786-2.patch | 9.85 KB | cpliakas |
Comments
Comment #1
cpliakas commentedAdding the stable release blocker tag, as this is critical for i18n.
Comment #2
cpliakas commentedThe attached patch implements the strategy mentioned in the OP. This would allow the translator module to integrate with i18n and look something like the code below:
The major benefit of this implementation is that is eliminates the need for logic surrounding the i18n module in core Facet API and allows a translator contrib to have different release cycles.
Comment #3
cpliakas commentedRequires a hook_facetapi_translate_string() definition in facetapi.api.php.
Comment #4
cpliakas commentedAdded the hook definition to facetapi.api.inc, made some other minor improvements.
Comment #5
cpliakas commentedMarking as "needs review".
Comment #6
cpliakas commentedComment improvements.
Comment #7
cpliakas commentedUgh. Removed stray dsm().
Comment #8
cpliakas commentedPlease excuse typos in comments.Posted against wrong issue.
Comment #9
cpliakas commentedCommitted at http://drupalcode.org/project/facetapi.git/commit/c01873d.