Chronos chronos left.png
Rusmed logo color.png
Chronos chronos right.png

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Différences entre les versions de « Module:Translate »

De Commission Historique
m
m
Ligne 123 : Ligne 123 :
["Identites"] = {["de"] = "Identities", ["en"] = "Identities", ["fr"] = "Identités"},
["Identites"] = {["de"] = "Identities", ["en"] = "Identities", ["fr"] = "Identités"},
["Specialite"] = {["de"] = "Spécialités", ["en"] = "Spécialités", ["fr"] = "Spécialités"},
["Specialite"] = {["de"] = "Spécialités", ["en"] = "Spécialités", ["fr"] = "Spécialités"},
["Profession_mere"] = {["de"] = "Beruf der Mutter", ["en"] = "Mother's occupation", ["fr"] = "Profession de la mère"},
["Profession_pere"] = {["de"] = "Beruf des Vaters", ["en"] = "Father's occupation", ["fr"] = "Profession du père"},
--[""] = {["de"] = "", ["en"] = "", ["fr"] = ""},
--[""] = {["de"] = "", ["en"] = "", ["fr"] = ""},
  }  
  }  

Version du 8 octobre 2021 à 14:34

La documentation pour ce module peut être créée à Module:Translate/doc

local p = {}
local langue = 'fr'
local lang = mw.getLanguage( langue )

local dict = {
	["Swedish"] = {["de"] = "Schwedisch", ["en"] = "Swedish", ["fr"] = "Suédois"},
	["adherent"] = {["de"] = "Anhänger", ["en"] = "Adherents", ["fr"] = "Adhérents"},
	["directeur"] = {["de"] = "Führungskräfte", ["en"] = "Executive staff", ["fr"] = "Cadres"},
	["Austrian"] = {["de"] = "Österreichisch", ["en"] = "Austrian", ["fr"] = "Autrichien"},
	["English"] = {["de"] = "Englisch", ["en"] = "English", ["fr"] = "Anglais"},
	["Holland"] = {["de"] = "Holland", ["en"] = "Holland", ["fr"] = "Hollande"},
	["Spanish"] = {["de"] = "Spanisch", ["en"] = "Spanish", ["fr"] = "Espagnol"},
	["Romania"] = {["de"] = "Rumänien", ["en"] = "Romania", ["fr"] = "Roumanie"},
	["Spain"] = {["de"] = "Spanien", ["en"] = "Spain", ["fr"] = "Espagne"},
	["French"] = {["de"] = "Französisch", ["en"] = "French", ["fr"] = "Français"},
	["Belgium"] = {["de"] = "Belgien", ["en"] = "Belgium", ["fr"] = "Belgique"},
	["directeur_de_these"] = {["de"] = "Doktorvater von ", ["en"] = "Thesis supervisor of", ["fr"] = "Directeur de thèse de"},
	["Dir_these"] = {["de"] = "Doktorvater", ["en"] = "Thesis supervisor", ["fr"] = "Directeur de thèse"},
	["Slovak"] = {["de"] = "Slowakisch", ["en"] = "Slovak", ["fr"] = "Slovaque"},
	["Greece"] = {["de"] = "Griechenland", ["en"] = "Greece", ["fr"] = "Grèce"},
	["Colombia"] = {["de"] = "Kolumbien", ["en"] = "Colombia", ["fr"] = "Colombie"},
	["Colombian"] = {["de"] = "kolumbianisch", ["en"] = "Colombian", ["fr"] = "Colombien"},
	["conjoint"] = {["de"] = "Ehepartner von", ["en"] = "Spouse of", ["fr"] = "Conjoint de"},
	["Hungary"] = {["de"] = "Ungarn", ["en"] = "Hungary", ["fr"] = "Hongrie"},
	["American"] = {["de"] = "amerikanisch", ["en"] = "American", ["fr"] = "Américain"},
	["chercheur"] = {["de"] = "Forscher", ["en"] = "Researchers", ["fr"] = "Chercheurs"},
	["Belgian"] = {["de"] = "belgisch", ["en"] = "Belgian", ["fr"] = "Belge"},
	["Turkey"] = {["de"] = "Türkei", ["en"] = "Turkey", ["fr"] = "Turquie"},
	["Relations de second ordre"] = {["de"] = "Beziehungen zweiter Ordnung", ["en"] = "Second-order relationships", ["fr"] = "Relations de second ordre"},
	["Italian"] = {["de"] = "Italienisch", ["en"] = "Italian", ["fr"] = "Italien"},
	["Catholic"] = {["de"] = "Katholisch", ["en"] = "Catholic", ["fr"] = "Catholique"},
	["Muslim"] = {["de"] = "Muslimisch", ["en"] = "Muslim", ["fr"] = "Musulman"},
	["Orthodox"] = {["de"] = "orthodox", ["en"] = "Orthodox", ["fr"] = "Orthodoxe"},
	["Czechoslovak"] = {["de"] = "Tschechoslowakisch", ["en"] = "Czechoslovak", ["fr"] = "Tchécoslovaque"},
	["employe"] = {["de"] = "Mitarbeiter", ["en"] = "Employees", ["fr"] = "Employés"},
	["United States"] = {["de"] = "US", ["en"] = "United States", ["fr"] = "États-Unis"},
	["Argentine"] = {["de"] = "argentinische", ["en"] = "Argentine", ["fr"] = "Argentin"},
	["Poland"] = {["de"] = "Polen", ["en"] = "Poland", ["fr"] = "Pologne"},
	["doyen"] = {["de"] = "<Doyens>", ["en"] = "<Doyens>", ["fr"] = "Doyens"},
	["Estonian"] = {["de"] = "Estnisch", ["en"] = "Estonian", ["fr"] = "Estonien"},
	["Finnish"] = {["de"] = "Finnisch", ["en"] = "Finnish", ["fr"] = "Finlandais"},
	["membre"] = {["de"] = "Gruppenmitgliedern", ["en"] = "Members", ["fr"] = "Membres"},
	["Czech Republic"] = {["de"] = "Tschechische Republik", ["en"] = "Czech Republic", ["fr"] = "Tchéquie"},
	["Finland"] = {["de"] = "Finnland", ["en"] = "Finland", ["fr"] = "Finlande"},
	["Germany"] = {["de"] = "Deutschland", ["en"] = "Germany", ["fr"] = "Allemagne"},
	["Sweden"] = {["de"] = "Wildleder", ["en"] = "Sweden", ["fr"] = "Suède"},
	["Paraguayan"] = {["de"] = "Paraguayisch", ["en"] = "Paraguayan", ["fr"] = "Paraguayen"},
	["Latvia"] = {["de"] = "Lettland", ["en"] = "Latvia", ["fr"] = "Lettonie"},
	["Jewish"] = {["de"] = "jüdisch", ["en"] = "Jewish", ["fr"] = "Juif"},
	["Lithuanian"] = {["de"] = "Litauisch", ["en"] = "Lithuanian", ["fr"] = "Lituanien"},
	["disciple"] = {["de"] = "Schüler von", ["en"] = "Disciple of", ["fr"] = "Disciple de"},
	["Lithuania"] = {["de"] = "Litauen", ["en"] = "Lithuania", ["fr"] = "Lituanie"},
	["United Kingdom"] = {["de"] = "Vereinigtes Königreich", ["en"] = "United Kingdom", ["fr"] = "Royaume-uni"},
	["Yugoslavia"] = {["de"] = "Jugoslawien", ["en"] = "Yugoslavia", ["fr"] = "Yougoslavie"},
	["ami"] = {["de"] = "Freund von", ["en"] = "Friend of", ["fr"] = "Ami de"},
	["Uruguayan"] = {["de"] = "Uruguayisch", ["en"] = "Uruguayan", ["fr"] = "Uruguayen"},
	["Dutch"] = {["de"] = "Holländisch", ["en"] = "Dutch", ["fr"] = "Hollandais"},
	["Norwegian"] = {["de"] = "Norwegisch", ["en"] = "Norwegian", ["fr"] = "Norvégien"},
	["Danish"] = {["de"] = "Dänisch", ["en"] = "Danish", ["fr"] = "Danois"},
	["Egypt"] = {["de"] = "Ägypten", ["en"] = "Egypt", ["fr"] = "Égypte"},
	["Libya"] = {["de"] = "Libyen", ["en"] = "Libya", ["fr"] = "Libye"},
	["Syria"] = {["de"] = "Syrien", ["en"] = "Syria", ["fr"] = "Syrie"},
	["collegue"] = {["de"] = "Kollege von", ["en"] = "Colleague of", ["fr"] = "Collègue de"},
	["Estonia"] = {["de"] = "Estland", ["en"] = "Estonia", ["fr"] = "Estonie"},
	["Norway"] = {["de"] = "Norwegen", ["en"] = "Norway", ["fr"] = "Norvège"},
	["Portugal"] = {["de"] = "Portugal", ["en"] = "Portugal", ["fr"] = "Portugal"},
	["Denmark"] = {["de"] = "Dänemark", ["en"] = "Denmark", ["fr"] = "Danemark"},
	["Czech"] = {["de"] = "Tschechisch", ["en"] = "Czech", ["fr"] = "Tchèque"},
	["France"] = {["de"] = "Frankreich", ["en"] = "France", ["fr"] = "France"},
	["Bulgaria"] = {["de"] = "Bulgarien", ["en"] = "Bulgaria", ["fr"] = "Bulgarie"},
	["enseignant"] = {["de"] = "Lehrer", ["en"] = "Teachers", ["fr"] = "Enseignants"},
	["Slovakia"] = {["de"] = "Slowakei", ["en"] = "Slovakia", ["fr"] = "Slovaquie"},
	["Czechoslovakia"] = {["de"] = "Tschechoslowakei", ["en"] = "Czechoslovakia", ["fr"] = "Tchécoslovaquie"},
	["Russian"] = {["de"] = "Russisch", ["en"] = "Russian", ["fr"] = "Russe"},
	["Uruguay"] = {["de"] = "Uruguay", ["en"] = "Uruguay", ["fr"] = "Uruguay"},
	["Austria"] = {["de"] = "Österreich", ["en"] = "Austria", ["fr"] = "Autriche"},
	["Argentina"] = {["de"] = "Argentinien", ["en"] = "Argentina", ["fr"] = "Argentine"},
	["fondateur"] = {["de"] = "Gründungsmitglieder", ["en"] = "Founders", ["fr"] = "Fondateurs"},
	["Soviet Union"] = {["de"] = "Sowjetunion", ["en"] = "Soviet Union", ["fr"] = "Union soviétique"},
	["paraguay"] = {["de"] = "Paraguay", ["en"] = "paraguay", ["fr"] = "Paraguay"},
	["Italy"] = {["de"] = "Italien", ["en"] = "Italy", ["fr"] = "Italie"},
	["Algeria"] = {["de"] = "Algerien", ["en"] = "Algeria", ["fr"] = "Algérie"},
	["Prenom"] = {["de"] = "Vorname", ["en"] = "First name", ["fr"] = "Prénom"},
	["Nom"] = {["de"] = "Nachname", ["en"] = "Last name", ["fr"] = "Nom"},
	["German"] = {["de"] = "Deutsch", ["en"] = "German", ["fr"] = "Allemand"},
	["Latvian"] = {["de"] = "Lettisch", ["en"] = "Latvian", ["fr"] = "Letton"},
	["inf_hier"] = {["de"] = "Unterstellter Mitarbeiter von", ["en"] = "Subordinate of", ["fr"] = "Subordonné de"},
	["Protestant"] = {["de"] = "Protestantisch", ["en"] = "Protestant", ["fr"] = "Protestant"},
	["Yugoslavian"] = {["de"] = "jugoslawisch", ["en"] = "Yugoslavian", ["fr"] = "Yougoslave"},
	["Portuguese"] = {["de"] = "Portugiesisch", ["en"] = "Portuguese", ["fr"] = "Portugais"},
	["Greek"] = {["de"] = "Griechisch", ["en"] = "Greek", ["fr"] = "Grec"},
	["Polish"] = {["de"] = "polnisch", ["en"] = "Polish", ["fr"] = "Polonais"},
	["Brazil"] = {["de"] = "Brasilien", ["en"] = "Brazil", ["fr"] = "Brésil"},
	["Hungarian"] = {["de"] = "Ungarisch", ["en"] = "Hungarian", ["fr"] = "Hongrois"},
	["Romanian"] = {["de"] = "Rumänisch", ["en"] = "Romanian", ["fr"] = "Roumain"},
	["Bulgarian"] = {["de"] = "Bulgarisch", ["en"] = "Bulgarian", ["fr"] = "Bulgare"},
	["Brazilian"] = {["de"] = "brasilianisch", ["en"] = "Brazilian", ["fr"] = "Brésilien"},
	["agent"] = {["de"] = "Vertreter", ["en"] = "Officers", ["fr"] = "Agents"},
	["superieur_hierarchique"] = {["de"] = "Vorgesetzter von", ["en"] = "Hierarchical superior of", ["fr"] = "Supérieur hierarchique de"},
	["Turkish"] = {["de"] = "Türkisch", ["en"] = "Turkish", ["fr"] = "Turc"},
	["Publications"] = {["de"] = "Publikationen", ["en"] = "Publications", ["fr"] = "Publications"},
	["References"] = {["de"] = "Literaturhinweise", ["en"] = "References", ["fr"] = "Références"},	
	["evaluateur"] = {["de"] = "Gutachter von", ["en"] = "Reviewer of", ["fr"] = "Évaluateur de"},
	["evalue_par"] = {["de"] = "Bewertet von", ["en"] = "Reviewed by", ["fr"] = "Évalué par"},
	["student"] = {["de"] = "Student von", ["en"] = "Student of", ["fr"] = "Étudiant de"},
	["teacher"] = {["de"] = "Lehrer für", ["en"] = "Teacher of", ["fr"] = "Enseignant de"},
	["sexe"] = {["de"] = "Geschlecht", ["en"] = "Gender", ["fr"] = "Sexe"},
	["Sexe"] = {["de"] = "Geschlecht", ["en"] = "Gender", ["fr"] = "Sexe"},	
	["feminin"] = {["de"] = "weiblich", ["en"] = "female", ["fr"] = "féminin"},
	["masculin"] = {["de"] = "männlich", ["en"] = "male", ["fr"] = "masculin"},
	["Annee_these"] = {["de"] = "Doktorarbeit", ["en"] = "Thesis", ["fr"] = "Thèse"},
	["Exercice_medecine"] = {["de"] = "Approbation", ["en"] = "Licence to practise medicine", ["fr"] = "Autorisation d'exercer la médecine"},
	["Date_capture"] = {["de"] = "Capture", ["en"] = "Capture", ["fr"] = "Capture"},
	["Switzerland"] = {["de"] = "Schweiz", ["en"] = "Switzerland", ["fr"] = "Suisse"},
	["Naissance"] = {["de"] = "Geboren", ["en"] = "Birth", ["fr"] = "Naissance"},
	["Lieu_de_naissance"] = {["de"] = "Geburtsort", ["en"] = "Place of birth", ["fr"] = "Lieu de naissance"},
	["Deces"] = {["de"] = "Todesdatum", ["en"] = "Death", ["fr"] = "Décès"},
	["Lieu_de_deces"] = {["de"] = "Todesort", ["en"] = "Place of death", ["fr"] = "Lieu de décès"},
	["Exam"] = {["de"] = "Examen", ["en"] = "Examen", ["fr"] = "Examen"},
	["Lieu_these"] = {["de"] = "Ort der Promotion", ["en"] = "Place of doctorate", ["fr"] = "Lieu de thèse"},
	["Profession"] = {["de"] = "Beruf", ["en"] = "Profession", ["fr"] = "Profession"},
	["Titre"] = {["de"] = "Titel", ["en"] = "Title", ["fr"] = "Titre"},
	["Identites"] = {["de"] = "Identities", ["en"] = "Identities", ["fr"] = "Identités"},
	["Specialite"] = {["de"] = "Spécialités", ["en"] = "Spécialités", ["fr"] = "Spécialités"},
	["Profession_mere"] = {["de"] = "Beruf der Mutter", ["en"] = "Mother's occupation", ["fr"] = "Profession de la mère"},
	["Profession_pere"] = {["de"] = "Beruf des Vaters", ["en"] = "Father's occupation", ["fr"] = "Profession du père"},
	--[""] = {["de"] = "", ["en"] = "", ["fr"] = ""},
 } 

function p.dict_to_csv()
	local res = ''
	for mot,translation in pairs(dict) do
		res = res .. mot .. ';' ..  translation['de'] .. ';' .. translation['en'] .. ';' .. translation['fr'] .. '<br>'
	end
	return(res)
end

function p.translate(expr,langue)
	if dict[expr] then 
		if dict[expr][langue] then
			return dict[expr][langue]
		elseif dict[expr]['en'] then
			return dict[expr]['en']
		elseif dict[expr]['fr'] then
			return dict[expr]['fr']
		elseif dict[expr]['de'] then
			return dict[expr]['de']
		else return expr
		end
	else return expr end
end

function p.transl(frame)
	local expr,langue =frame.args[1],frame.args[2]
	if dict[expr] then 
		if dict[expr][langue] then
			return dict[expr][langue]
		elseif dict[expr]['en'] then
			return dict[expr]['en']
		elseif dict[expr]['fr'] then
			return dict[expr]['fr']
		elseif dict[expr]['de'] then
			return dict[expr]['de']
		else return expr
		end
	else return expr end
end

return p