Skip to content

Instantly share code, notes, and snippets.

@stefanbuck
Last active December 16, 2015 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefanbuck/5420259 to your computer and use it in GitHub Desktop.
Save stefanbuck/5420259 to your computer and use it in GitHub Desktop.
i18n in The M Project 2
/**
* Key - Value style
*/
M.I18N.de_de = {
'global.button.back' : 'Back',
'global.button.close' : 'Close',
'global.button.remove' : 'delete',
'global.button.remove.confirm' : 'Do you really want to delete this item??',
'global.button.edit' : 'Edit',
'global.button.next' : 'Next »',
'global.button.reset' : 'Reset',
'global.button.submit' : 'Submit',
'global.date.day' : 'Day',
'global.date.days' : 'Days',
'global.date.hour' : 'Hour',
'global.date.hours' : 'Hours',
'global.dateFormat' : '%d.%m.%Y',
'global.dateFormatToday' : '<b>Today</b>, %H:%M',
'global.dateFormatYesterday' : 'Yesterday, %H:%M',
'global.decimalPoint' : ',',
'global.error.backward' : 'Back to last page',
'global.error.empty' : 'Please enter the required information for this field.',
'global.error.file.notFound' : 'The file could not be found.',
'global.error.permissionDenied' : 'You are not allowed to enter this page. ',
'global.error.permissionDenied.title' : 'Permission denied',
'global.error.title' : 'Error message',
'global.form.error' : 'The data you have entered are invalid. Please check the information you have given in the marked fields.',
'global.language.ar' : 'Arabic',
'global.language.bs' : 'Bosnian',
'global.language.cs' : 'Czech',
'global.language.da' : 'Danish',
'global.language.de' : 'German',
'global.language.el' : 'Greek',
'global.language.en' : 'English',
'global.language.es' : 'Spanish',
'global.language.fa' : 'Persian',
'global.language.fi' : 'Finnish',
'global.language.fr' : 'French',
'global.language.he' : 'Hebrew',
'global.language.hr' : 'Croatian',
'global.language.hu' : 'Hungarian',
'global.language.it' : 'Italian'
}
/**
* Object style
*/
M.I18N.de_de = {
global : {
button : {
back : 'Back',
close : 'Close',
remove : {
label: 'delete',
confirm : 'Do you really want to delete this item??'
},
edit : 'Edit',
next : 'Next &raquo;',
reset : 'Reset',
submit : 'Submit'
},
date : {
day : 'Day',
days : 'Days',
hour : 'Hour',
hours : 'Hours'
},
dateFormat : '%d.%m.%Y',
dateFormatToday : '<b>Today</b>, %H:%M',
dateFormatYesterday : 'Yesterday, %H:%M',
decimalPoint : ',',
error : {
backward : 'Back to last page',
empty : 'Please enter the required information for this field.',
file : {
notFound : 'The file could not be found.',
},
permissionDenied : 'You are not allowed to enter this page. ',
permissionDenied : {
title : 'Permission denied'
},
title : 'Error message'
},
form : {
error : 'The data you have entered are invalid. Please check the information you have given in the marked fields.',
},
language : {
ar : 'Arabic',
bs : 'Bosnian',
cs : 'Czech',
da : 'Danish',
de : 'German',
el : 'Greek',
en : 'English',
es : 'Spanish',
fa : 'Persian',
fi : 'Finnish',
fr : 'French',
he : 'Hebrew',
hr : 'Croatian',
hu : 'Hungarian',
it : 'Italian'
}
}
}
/**
* Advanced and powerful
*/
M.I18N.de_de = {
'global.button' : {
'back' : 'Back',
'close' : 'Close',
'remove' : 'delete',
'remove.confirm' : 'Do you really want to delete this item??',
'edit' : 'Edit',
'next' : 'Next &raquo;',
'reset' : 'Reset',
'submit' : 'Submit'
},
'global.date' : {
'day' : 'Day',
'days' : 'Days',
'hour' : 'Hour',
'hours' : 'Hours'
},
'dateFormat' : '%d.%m.%Y',
'dateFormatToday' : '<b>Today</b>, %H:%M',
'dateFormatYesterday' : 'Yesterday, %H:%M',
'decimalPoint' : ',',
'global.error' : {
'backward' : 'Back to last page',
'empty' : 'Please enter the required information for this field.',
'file.notFound' : 'The file could not be found.',
'permissionDenied' : 'You are not allowed to enter this page. ',
'permissionDenied.title' : 'Permission denied',
'title' : 'Error message'
},
'global.form.error' : 'The data you have entered are invalid. Please check the information you have given in the marked fields.',
'global.language' : {
'ar' : 'Arabic',
'bs' : 'Bosnian',
'cs' : 'Czech',
'da' : 'Danish',
'de' : 'German',
'el' : 'Greek',
'en' : 'English',
'es' : 'Spanish',
'fa' : 'Persian',
'fi' : 'Finnish',
'fr' : 'French',
'he' : 'Hebrew',
'hr' : 'Croatian',
'hu' : 'Hungarian',
'it' : 'Italian'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment