-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtranslations.ts
61 lines (58 loc) · 1.94 KB
/
translations.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// test
var translations = {
titles: {
information: {en: "Information", fr: "Information"},
entry: {en: "Entry", fr: "Saisie"},
choice: {en: "Choice", fr: "Choix"},
confirm: {en: "Confirm", fr: "Confirmation"},
serverError: {en: "Server error", fr: "Erreur sur le serveur"},
new: {en: "New", fr: "Ajouter"},
edit: {en: "Edit", fr: "Modifier"},
remove: {en: "Remove", fr: "Supprimer"}
},
buttons: {
ok: {en: "Ok", fr: "D'accord"},
cancel: {en: "Cancel", fr: "Annuler"},
submit: {en: "Submit", fr: "Soumettre"},
valid: {en: "Valid", fr: "Valider"},
confirm: {en: "Confirm", fr: "Confirmer"},
yes: {en: "Yes", fr: "Oui"},
no: {en: "No", fr: "Non"}
},
messages: {
serverError: {
en: "An error has occured on the server. Please try to submit your request again. If the error persists, please contact the administrator, giving him the details of the error thereafter :",
fr: "Une erreur est survenue sur le serveur. Veuillez soumettre votre requête à nouveau. Si l'erreur persiste, prière de contacter l'administrateur, en lui communiquant les détails de l'erreur ci-après :"
}
},
labels: {
year: {en: "Year", fr: "Année"},
month: {en: "Month", fr: "Mois"},
day: {en: "Day", fr: "Jour"}
},
placeholders: {
YYYY: {en: "YYYY", fr: "AAAA"},
YY: {en: "YY", fr: "AA"},
MM: {en: "MM", fr: "MM"},
DD: {en: "DD", fr: "JJ"},
selectMany: {en: "Select many...", fr: "Sélectionner plusieurs..."}
}
};
var language = "fr";
export const tr = {
title: (value: string) => {
return translations.titles[value][language];
},
btn: (value: string) => {
return translations.buttons[value][language];
},
msg: (value: string) => {
return translations.messages[value][language];
},
lbl: (value: string) => {
return translations.labels[value][language];
},
plcldr: (value: string) => {
return translations.placeholders[value][language];
}
}