Closed XxFri3ndlyxX closed 5 years ago
okay found out that is because i hadput client file in a client folder and renamed it to main.lua same was for server. So i reverted that but it's not working. Locales['en'] = { ['sortir_la_voiture'] = 'Get Vehicle Out', ['renommer_la_voiture'] = 'Rename Vehicle', }
But it will still read sortir_la_voiture
you need to make a folder called locale, in it you need a file called 'en.lua', then in configfile you need some code and in scripts you need something like that : _U("test")
So i have been wating to make the locales but since i don't know how this works. I tried and failed. so in the resources.lua dependency 'ft_libs'
server_scripts { '@mysql-async/lib/MySQL.lua', 'server/main.lua', 'config.lua', 'version.lua', } client_script { 'client/main.lua', 'config.lua', 'locales/en.lua', }
Then in the config.cfg Config.Locale = 'en'
and as a test in en.lua Locales['en'] = { ['Retour_vehicule'] = 'Return Vehicle', }
Then in main.lua i changed
{label = "Retour vehicule ("..Config.Price.."$)", value = 'return_vehicle'}, to {label = "Retour_vehicule ("..Config.Price.."$)", value = 'return_vehicle'}, but then i get error attempting to index a nil value (global 'Locales') Can someone help me with this.