msayed-net / localize_and_translate

Flutter localization in easy steps
MIT License
52 stars 22 forks source link

Add arguments to translate method #5

Closed mu-dawood closed 4 years ago

mu-dawood commented 4 years ago

whats changed translate method can now accept arguments to be replaced with passed values translator.translate("word",{"{a1}":"value1","{a2}","value2"}) examples

///we well use translator.translate("word",{"{a1}":"banana","{a2}":"orange"})
"word":"This is {a1} and {a2}" => This is banana and orange
"word":"This is {a1} and {a2}, {a1} is good" => This is banana and orange, banana is good

note as this is a package not a plugin i removed android and ios code to avoid version conflicts

msayed-net commented 4 years ago

@all-contributors please add @mo-ah-dawood for code

allcontributors[bot] commented 4 years ago

@msayed-net

I've put up a pull request to add @mo-ah-dawood! :tada: