How do you mix underscorejs and gettext for _(“”)?
What do you think is better to give gettext another function name or rename underscorejs?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use Underscore’s
noConflictmethod, for example:Now you can access Underscore’s methods from
underscorevariable and gettext’s from_.UPD: Excuse me, misunderstood. Personally, I think the one should reserve
_for Underscore and usegtfor Gettext. The reason behind it is that using Underscore and seeing it as_seems to be more common for JS developers.