UAEpro Posted June 4, 2011 Share Posted June 4, 2011 hello instade i wrote if lang == ar then lang = Arabic elseif lang == en then lang = English elseif lang == fr then lang = France end can i make like a table ( i know i can but how ) for example lang = { "ar" == "Arabic", } how i could make it ? Link to comment
Aibo Posted June 4, 2011 Share Posted June 4, 2011 lang = { ar = "Arabic", en = "English", fr = "French" } Link to comment
qaisjp Posted June 4, 2011 Share Posted June 4, 2011 for i,v in pairs(lang) do if lang == i then lang = v end end Link to comment
Aibo Posted June 4, 2011 Share Posted June 4, 2011 for i,v in pairs(lang) do if lang == i then lang = v end end you're comparing a table "lang" with a string Link to comment
UAEpro Posted June 4, 2011 Author Share Posted June 4, 2011 for i,v in pairs(lang) do if lang == i then lang = v end end Thats What i want .. Thank you ^.^ Link to comment
qaisjp Posted June 6, 2011 Share Posted June 6, 2011 (edited) if lang[language] then language == lang[language] end Edited June 6, 2011 by Guest Link to comment
DiSaMe Posted June 6, 2011 Share Posted June 6, 2011 Looping is unnecessary here langlist = { ar = "Arabic", en = "English" } ----------- lang = langlist[lang] Link to comment
h1ama3d Posted June 6, 2011 Share Posted June 6, 2011 ذذ ,, وش بتبرمج ؟؟ >> بيتسطر امزح ذذ Link to comment
qaisjp Posted June 6, 2011 Share Posted June 6, 2011 Sorry for the edit, I wanted to quote but i accidentally pressed edit. Link to comment
Castillo Posted June 6, 2011 Share Posted June 6, 2011 ذذ ,, وش بتبرمج ؟؟ >> بيتسطر امزح ذذ What is this? do you know that this is a English-only speaking forum? if you want to speak in your own language, search in "Languages" section for your language. Link to comment
h1ama3d Posted June 7, 2011 Share Posted June 7, 2011 OK :@ He is Arabian, and I explain to him in Arabic Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now