Need help defining content language for correct automatic word breaks - Joomla! Forum - community, help and support
hi guys!
so need insert automatic hyphens words prevent long words extending out of element. have done so, problem browser using wrong grammatical rules insert hyphens words, resulting in words breaking in wrong places sometimes.
from understand, in order browser know grammatical rules follow content language in question element should have lang=" " attribute in it.
for example:
<h2 lang="fi">insert long finnish word here</h2> when site displayed in finnish
and
<h2 lang="en">insert long english word here</h2> when site displayed in english.
then browser know use finnish grammatical rules finnish content, , english rules english content.
is there way joomla automatically inject lang attribute headings , paragraphs according language in site being displayed?
thanks!
so need insert automatic hyphens words prevent long words extending out of element. have done so, problem browser using wrong grammatical rules insert hyphens words, resulting in words breaking in wrong places sometimes.
from understand, in order browser know grammatical rules follow content language in question element should have lang=" " attribute in it.
for example:
<h2 lang="fi">insert long finnish word here</h2> when site displayed in finnish
and
<h2 lang="en">insert long english word here</h2> when site displayed in english.
then browser know use finnish grammatical rules finnish content, , english rules english content.
is there way joomla automatically inject lang attribute headings , paragraphs according language in site being displayed?
thanks!
(a) in tag <html> language seen shown below.
(b) if want insert language code in appropriate places, shown in example, done. suggest reviewing document https://docs.joomla.org/jfactory/getlanguage explains how language code. have make changes appropriate files (e.g., if in header). when doing so, suggest following html override technique documented @ https://docs.joomla.org/understanding_output_overrides , https://docs.joomla.org/how_to_override_the_output_from_the_joomla!_core. if needed, language code entered within article itself. may need plugin insert php code.
code: select all
<html lang="en-gb" dir="ltr">
(b) if want insert language code in appropriate places, shown in example, done. suggest reviewing document https://docs.joomla.org/jfactory/getlanguage explains how language code. have make changes appropriate files (e.g., if in header). when doing so, suggest following html override technique documented @ https://docs.joomla.org/understanding_output_overrides , https://docs.joomla.org/how_to_override_the_output_from_the_joomla!_core. if needed, language code entered within article itself. may need plugin insert php code.
Comments
Post a Comment