Currently, if one needs to change character mappings or add language-specific variants, the mapping files in the translation module must be patched. This is bad practice because it makes updating the module very difficult.
I propose that a hook be added that will allow modules to alter character mappings.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | alter-mappings-1943290-1.patch | 835 bytes | jtsnow |
Comments
Comment #1
jtsnow commentedI've attached a patch that would allow modules to alter character mappings.
It works by allowing modules to supply an alternate mapping file. Here is an example of how I am using it:
Modules can also use it to supply a language-specific file for variants without duplicating the code for the base mapping.
Comment #2
jtsnow commentedComment #3
amateescu commentedI think this should be postponed to 7.x-4.x, which will be a backport of the codebase from D8 core that already includes this hook.
Comment #4
BeRGB commentedDefinitely it would be useful, I have problem with serbian characters like
$variant['sr'] = array(
0x10 => 'Dj',
0x11 => 'dj',
);
I have to add directly in data file, probably I will override on next update :)
Comment #5
michaelpetri commentedPatch #1 works pretty well for me, thanks! I hope this will be implemented in the next release.