Hyphenate a word that contains a diacritic used in Romanian writing
The T1 font encoding doesn't unfortunately support Romanian. It has just 256 available slots for characters and when it was devised other choices were made.
The idea was that other font encodings would have appeared in order to cover other variants of the Latin alphabet. Romanian is in good company: Maltese, Latvian and Lithuanian, among European languages, are not fully supported. No alternative encoding was devised and, even if it is now, fonts should be rebuilt to support it.
The comma below diacritic for Ș and Ț are only available as built characters, which has the consequence that TeX cannot hyphenate a word past them and it's not possible to specify them neither in hyphenation patterns nor in \hyphenation
.
So this is not a problem with babel
.
On the other hand, Unicode contains the characters U+0218, U+0219, U+021A and U+021B in the Latin Extended-B block. The hyphenation patterns for Romanian contain them, but this means that a Unicode-aware engine has to be used, so you should go with XeLaTeX or LuaLaTeX.
There may be a shortcoming in the pdfLaTeX-based implementation of Romanian babel
. Fortunately, compiling a basic test document under LuaLaTex seems to work just fine.
% !TEX program = lualatex
\documentclass{article}
\usepackage[romanian]{babel}
\addto\extras{romanian}{\hyphenation{i-lo-cu-ți-o-na-re func-ți-i-le}}
\AtBeginDocument{\lefthyphenmin1 \righthyphenmin2} % defaults are '2' and '3', resp.
% Just for this example:
\setlength\textwidth{1sp}
\setlength\parindent{0pt}
\begin{document}
ilocuționare funcțiile
\end{document}