Bonjour à tous,
I would like to propose an enhancement regarding Hazaragi (ISO 639-3 code: haz
) language support in SPIP.
Hazaragi is a Right-to-Left (RTL) language. It is already listed as an option under ecrire/?exec=configurer_multilinguisme
for language selection, which is great for multisite projects. However, when selected, it does not currently render with the correct RTL direction automatically.
For projects like the Hazaragi multisite I am currently working on, native RTL recognition would be incredibly beneficial. While it’s possible to manage this through a custom plugin, having haz
officially recognized as RTL in the core would greatly streamline development and maintenance for the Hazaragi-speaking community using SPIP.
I am therefore requesting that 'haz'
be added to the $lang_rtl
array within the lang_dir
function in ecrire/inc/lang.php
.
The proposed change would look like this:
// C'est utilise par #LANG_DIR, #LANG_LEFT, #LANG_RIGHT.
function lang_dir($lang = '', $droitier = 'ltr', $gaucher = 'rtl')
{
static $lang_rtl = ['ar', 'fa', 'ku', 'prs', 'ps', 'ur', 'haz', 'he', 'heb', 'hbo', 'yi'];
// Adding 'haz' to the list above ^
return in_array(($lang ?: $GLOBALS['spip_lang']), $lang_rtl) ?
$gaucher : $droitier;
}
I have tested this modification locally, and it successfully ensures the correct RTL direction for Hazaragi content.
It would be fantastic to see this included in a future SPIP release. Thank you for your time and consideration!
Best regards,