General consideration for bilingual services
Declaring the language of page content helps assistive technology and translation services in browsers. Language can be declared globally or on specific tags.
Global declaration sets the page language and tells assistive technology and the browser what language should be used when reading the page content and code.
Specific tag declaration tells assistive technology and the browser that the content of the tag is not in the same language as the global declared lang
.
List of Language code reference
Global declaration examples
HTML pages
Declare language inside the html
tag using the the lang
attribute.
Code
<html lang="fr">
XHTML pages
Declare language inside the html
tag using the the lang
and xml:lang
attribute.
Code
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr">
Specific tag declaration examples
The lang
attribute can be added to any HTML tags.
Example
Les renseignements personnels que vous fournissez en ligne pour le Permis de loterie à billets pour des prix d’une valeur inférieure à 4 000 $ sont recueillis au titre de la loi sur l’accès à l’information et la protection de la vie privée de la Nouvelle-Écosse (Freedom of Information and Protection of Privacy Act) et de la loi sur la régie du jeu Gaming Control Act)
Code
<p>Les renseignements personnels que vous fournissez en ligne pour le Permis de loterie à billets pour des prix d’une valeur inférieure à 4 000 $ sont recueillis au titre de la loi sur l’accès à l’information et la protection de la vie privée de la Nouvelle-Écosse (<i lang="en">Freedom of Information and Protection of Privacy Act</i>) et de la loi sur la régie du jeu (<i lang="en" >Gaming Control Act</i>).</p>
Example
English
Code
<a href="content-page-template.html" hreflang="en" lang="en">English</a>
Other language declaration attribute examples
The hreflang
attribute specifies the language of the link destination.
Text in code and hidden text
All English text that is in the HTML code needs to be translated when translation of a service is required. This inlcudes attributes like alt
, content
and aria-label
, or hidden content like a "Skip to main content" link and error messages for a form field.
Examples of alt
attribute
<img src="/sns/img/plaque-immatriculation-portant-drapeau-acadien-sm.png" alt="Plaque d’immatriculation portant le drapeau acadien" width="110" height="55">
<area shape="rect" coords="0,0,82,126" href="sun.htm" hreflang="en" alt="Soleil">
Example of content
attribute
The content
attribute for meta
tags contains text that is not visible on the screen, but is readable by assistive technology, browsers, and search engines. The content
attribute is often overlooked and not translated.
<meta name="description" content="Liste à jour des fermetures du gouvernement provincial."/>
<meta name="dcterms.title" content="Fermetures, annulations et changements aux services"/>
Examples of aria-label
attributes
An aria-label
attribute is an invisible label where a visible label can't be used.
<nav id="navigation" class="ribbon" role="navigation" aria-label="Navigation principale">
<button aria-label="Fermer" onclick="document.getElementById('box').style.display='none';" class="close-button">X</button>
<nav class="skip-links" aria-label="Passer au contenu principal">
<section aria-label="Navigation du calendrier" class="Calendar-nav">
<button id="previous" class="Calendar-nav--button Calendar-nav--button--unavailable" type="button" aria-label="Le mois précédent" tabindex="-1"> </button>
<button id="next" class="Calendar-nav--button" type="button" aria-label="Le mois prochain">❯</button></section>
Examples of Hidden content
Some text is hidden from being displayed on the screen. This text could be used for help keyboard-only users navigate a page, like in the example of Skip link.
Examples of Error message
Show an error message when there is a validation error. In the error message explain what went wrong and how to fix it.
Examples of Error message.
Links
On French pages, all links should have French text for the title
attribute and a language declaration for hreflang
attribute. The hreflang
attribute should set to the language of content targeted by link. The lang
should only be used when the language of the hypertext is different than the global declared language.
- If the target it French use
hreflang="fr"
.
- If the hypertext is in English add
lang="en"
to the a
tag.
- If the target it English use
hreflang="en"
and "en anglais seulement" should be added to the title
attribute and hypertext.
- If the hypertext is in English add
lang="en"
to the a
tag.
Examples of a French target
<a href="https://beta.novascotia.ca/fr/enonce-de-confidentialite" hreflang="fr" title="Énoncé de confidentialité">Énoncé de confidentialité</a>
Examples of a English target with French title
and hypertext
<a href="https://beta.novascotia.ca/contact/health-and-wellness#DHW-MSI-01" hreflang="en" title="le Service d’inscription et de demande de renseignements du MSI (en anglais seulement)">le Service d’inscription et de demande de renseignements du MSI (en anglais seulement)</a>
Examples of a English target with English title
and hypertext
<a href="http://www.nshealth.ca/legacy-life" hreflang="en" lang="en" title="Legacy of Life (en anglais seulement)">Legacy of Life (en anglais seulement)</a>
French grammar rules
Capitization
Capitization for French is different than English. In French, names of languages are not capitized. For example, (en français)
Below are some of the French grammar rules from https://www.lalanguefrancaise.com/general/guide-complet-usage-majuscules-francais/.
When to use a upper-case letter?
- At the beginning of the sentence.
- After a period except in the case of using a period for an abbreviation ("etc.").
- After an exclamation point except if it's an interjection.
- Do not put a capital letter after the semicolon.
- Only on the first word of a title or subtitle should be capitalized in French (unlike in English).
- First names, surnames and nicknames always take a capital letter.
- When nouns and adjectives are used as nicknames, they are capitalized.
Punctuation
This is a table of French typographical rules for punctuation. Source: 17 French Typographical Rules.
Please note: For some of the punctuation that requires a space before or after it, you should use the *
code.
* Asterisk
- Placement
- When it is before a word
- Space before
- Yes, there is one space before it.
- Space after
- No space
- Example
- Sauf dans ce qui *suit
- Code
Sauf dans ce qui *suit
Asterisk *
- Placement
- When it is after a word
- Space before
- There is no space before it.
- Space after
- Yes, there is one space after it.
- Example
- La date d'expiration* dépend de la date d'application.
- Code
La date d'expiration* dépend de la date d'application.
Brackets [
- Placement
- When it is the opening bracket.
- Space before
- Yes, there is one space before it.
- Space after
- There is no space after it.
- Example
- Par exemple : FINCH — 220867001 (cinq lettres [Finch] + 22 [jour] + 08 [mois] + 67 [année - 1967] + 001 [3 chiffres choisis par l’ordinateur )
- Code
Par exemple : FINCH — 220867001 (cinq lettres [Finch] + 22 [jour] + 08 [mois] + 67 [année - 1967] + 001 [3 chiffres choisis par l’ordinateur] )
Brackets ]
- Placement
- When it is the closing bracket.
- Space before
- There is no space before it.
- Space after
- Yes, there is one space after it.
- Example
- Par exemple : FINCH — 220867001 (cinq lettres [Finch] + 22 [jour] + 08 [mois] + 67 [année - 1967] + 001 [3 chiffres choisis par l’ordinateur] )
- Code
Par exemple : FINCH — 220867001 (cinq lettres [Finch] + 22 [jour] + 08 [mois] + 67 [année - 1967] + 001 [3 chiffres choisis par l’ordinateur] )
Colon :
- Placement
- After a word
- Space before
- Yes, there is one space before it.
- Space after
- Yes, there is one space after it.
- Example
- Par exemple : FINCH — 220867001 (cinq lettres [Finch] + 22 [jour] + 08 [mois] + 67 [année - 1967] + 001 [3 chiffres choisis par l’ordinateur] )
- Code
Par exemple : FINCH — 220867001 (cinq lettres [Finch] + 22 [jour] + 08 [mois] + 67 [année - 1967] + 001 [3 chiffres choisis par l’ordinateur] )
Comma ,
- Placement
- After a word
- Space before
- There is no space before it.
- Space after
- Yes, there is one space after it.
- Example
- un passeport, un permis de conduit ou une carte de santé
- Code
un passeport, un permis de conduit ou une carte de santé
Decimal comma ,
- Placement
- In the middle of numbers.
- Space before
- There is no space before it.
- Space after
- There is no space after it.
- Example
- 55,45 $
- Code
55,45 $
Dash (em) —
- Placement
- After a word.
- Space before
- Yes, there is one space before it.
- Space after
- Yes, there is one space after it.
- Example
- Par exemple : FINCH — 220867001 (cinq lettres [Finch] + 22 [jour] + 08 [mois] + 67 [année - 1967] + 001 [3 chiffres choisis par l’ordinateur] )
- Code
Par exemple : FINCH — 220867001 (cinq lettres [Finch] + 22 [jour] + 08 [mois] + 67 [année - 1967] + 001 [3 chiffres choisis par l’ordinateur] );
Ellipsis ...
- Placement
- When it is at beginning of a sentence.
- Space before
- There is no space before it.
- Space after
.
- Yes, there is one space after it.
- Example
- ... tu dois...
- Code
... tu dois...
... Ellipsis
- Placement
- When it is at the middle or at end of a sentence.
- Space before
- There is no space before it.
- Space after
- Yes, there is one space after it.
- Example
- ... tu dois...
- Code
... tu dois...
Exclamation mark !
- Placement
- At the end of a sentence.
- Space before
- There is no space before it.
- Space after
- Yes, there is one space after it.
- Example
- Attention!
- Code
Attention!
Oblique /
- Placement
- In the between of two words.
- Space before
- There is no space before it.
- Space after
- There is no space after it.
- Example
- Vitesse maximum : 110 km/h
- Code
Vitesse maximum : 110 km/h
Parenthesis (
- Placement
- When it is the opening parenthesis.
- Space before
- Yes, there is one space before it.
- Space after
- There is no space after it
- Example
- Par exemple : FINCH — 220867001 (cinq lettres [Finch] + 22 [jour] + 08 [mois] + 67 [année - 1967] + 001 [3 chiffres choisis par l’ordinateur] )
- Code
Par exemple : FINCH — 220867001 (cinq lettres [Finch] + 22 [jour] + 08 [mois] + 67 [année - 1967] + 001 [3 chiffres choisis par l’ordinateur] )
Parenthesis )
- Placement
- When it is the closing parenthesis.
- Space before
- There is no space before it.
- Space after
- Yes, there is one space after it.
- Example
- Par exemple : FINCH — 220867001 (cinq lettres [Finch] + 22 [jour] + 08 [mois] + 67 [année - 1967] + 001 [3 chiffres choisis par l’ordinateur] )
- Code
Par exemple : FINCH — 220867001 (cinq lettres [Finch] + 22 [jour] + 08 [mois] + 67 [année - 1967] + 001 [3 chiffres choisis par l’ordinateur] )
Period .
- Placement
- Space before
- There is no space before it.
- Space after
- Yes, there is one space after it.
- Example
- Vous pouvez utiliser le formulaire « Application for Lottery Permit for Prizes Not Exceeding $4,000 in Value » si vous ne pouvez pas faire la demande en ligne.
- Code
Vous pouvez utiliser le formulaire « Application for Lottery Permit for Prizes Not Exceeding $4,000 in Value » si vous ne pouvez pas faire la demande en ligne.
Question mark ?
- Placement
- At the end of a sentence.
- Space before
- There is no space before it.
- Space after
- Yes, there is one space after it.
- Example
- Est-ce que l'information sur cette page était utile?
- Code
Est-ce que l'information sur cette page était utile?
Quotation mark «
- Placement
- When it is the opening quotation mark.
- Space before
- Yes, there is one space before it.
- Space after
- Yes, there is one space after it.
- Example
- Vous pouvez utiliser le formulaire « Application for Lottery Permit for Prizes Not Exceeding $4,000 in Value » si vous ne pouvez pas faire la demande en ligne.
- Code
Vous pouvez utiliser le formulaire « Application for Lottery Permit for Prizes Not Exceeding $4,000 in Value » si vous ne pouvez pas faire la demande en ligne.
Quotation mark »
- Placement
- When it is the closing quotation mark.
- Space before
- Yes, there is one space before it.
- Space after
- Yes, there is one space after it.
- Example
- Vous pouvez utiliser le formulaire « Application for Lottery Permit for Prizes Not Exceeding $4,000 in Value » si vous ne pouvez pas faire la demande en ligne.
- Code
Vous pouvez utiliser le formulaire « Application for Lottery Permit for Prizes Not Exceeding $4,000 in Value » si vous ne pouvez pas faire la demande en ligne.
Semicolon ;
- Placement
- After a word.
- Space before
- There is no space before it.
- Space after
- Yes, there is one space after it.
- Example
Assurez-vous de fournir ce qui suit :
- une œuvre créative qui porte votre nom;
- une confirmation de votre inscription dans une université ou un collège; (reçu pour les frais de scolarité ou lettre du bureau du registraire ou d'un professeur) .
- Code
Assurez-vous de fournir ce qui suit :
une œuvre créative qui porte votre nom;
une confirmation de votre inscription dans une université ou un collège; (reçu pour les frais de scolarité ou lettre du bureau du registraire ou d'un professeur) .
Currency
Use the comma as the decimal marker in French texts and place the dollar sign after the numerals. There should a space (use
) between the numerals and dollar sign.
When the dollar amount has four or more figures use a space (
) to seperate the numerals in groups of threes.
Source: Symbol for the Canadian dollar in French
Examples
55,45 $
42 987,34 $
English words in French content
Acts or regulations
The majority of the acts and regualtions in Nova Scotia are written (or proclaim) in English. For this reason, the official names are almost never translated. When the official names are in French content, you should use the i
tag and the lang
attribute.
Example
Toute personne reconnue coupable d'une infraction à la loi sur les embaumeurs et les entrepreneurs de pompes funèbres (Embalmers and Funeral Directors Act) peut être condamnée à une amende maximale de 2 000 $.
Code
<p>Toute personne reconnue coupable d'une infraction à la loi sur les embaumeurs et les entrepreneurs de pompes funèbres (<i lang="en">Embalmers and Funeral Directors Act</i>) peut être condamnée à une amende maximale de 2 000 $.</p>
Organization or company name
Some organization (private or governmental) will only have an English name and it will not be translated. When that is the case, you should use the i
tag and the lang
attribute to its name and acronym of the name.
Example
Le directeur du salon funéraire, du crématorium ou de l'entreprise doit être un entrepreneur de pompes funèbres autorisé par le Nova Scotia Board of Registered Embalmers and Funeral Directors (NSBREFD)
Code
<p>Le directeur du salon funéraire, du crématorium ou de l'entreprise doit être un entrepreneur de pompes funèbres autorisé par le <i lang="en">Nova Scotia Board of Registered Embalmers and Funeral Directors</i> (<i lang="en">NSBREFD</i>)</p>
French characters
URL Encoded
Char |
Dec |
Hex |
Entity |
Name |
À |
192 |
00C0 |
À
|
A accent grave |
à |
224 |
00E0 |
à
|
a accent grave |
Á |
193 |
00C1 |
Á
|
A accent acute |
á |
225 |
00E1 |
á
|
A accent acute |
 |
194 |
00C2 |
Â
|
a accent circumflex |
â |
226 |
00E2 |
â
|
a accent circumflex |
Æ |
198 |
00C6 |
Æ
|
AE |
æ |
230 |
00E6 |
æ |
ae |
Ç |
199 |
00C7 |
Ç
|
C cédille (cedilla) |
ç |
231 |
00E7 |
ç |
c cédille (cedilla) |
È |
200 |
00C8 |
È
|
E accent grave |
è |
232 |
00E8 |
è |
e accent grave |
É |
201 |
00C9 |
É
|
E accent acute |
é |
233 |
00E9 |
é |
e accent acute |
Ê |
202 |
00CA |
Ê
|
E accent circumflex |
ê |
234 |
00EA |
ê |
e accent circumflex |
Ë |
203 |
00CB |
Ë
|
E tréma (diaeresis) |
ë |
235 |
00EB |
ë |
e tréma (diaeresis) |
Î |
206 |
00CE |
Î
|
I accent circumflex |
î |
238 |
00EE |
î |
i accent circumflex |
Ï |
207 |
00CF |
Ï
|
I tréma (diaeresis) |
ï |
239 |
00EF |
ï |
i tréma (diaeresis) |
Ô |
212 |
00D4 |
Ô
|
O accent circumflex |
ô |
244 |
00F4 |
ô |
o accent circumflex |
Ö |
214 |
00D6 |
Ö
|
O tréma (diaeresis) |
ö |
246 |
00F6 |
ö |
o tréma (diaeresis) |
Ù |
217 |
00D9 |
Ù
|
U accent grave |
ù |
249 |
00F9 |
ù |
u accent grave |
Ú |
218 |
00DA |
Ú
|
U accent acute |
ú |
250 |
00FA |
ú |
u accent acute |
Û |
219 |
00DB |
Û
|
U accent circumflex |
û |
251 |
00FB |
û |
u accent circumflex |
Ü |
220 |
00DC |
Ü
|
U tréma (diaeresis) |
ü |
252 |
00FC |
ü |
u tréma (diaeresis) |
« |
171 |
00AB |
«
|
Quotation mark (opening) |
» |
187 |
00BB |
»
|
Quotation mark (closing) |