Setting-up faker locale?

Hi everyone,

I’m looking for a way to set the faker locale used for dynamic variables (e.g. {{$randomLastName}}), in order to retreive data localized.
I guess by default Postam (v8.8.0) is using “en”.

Many thanks,

1 Like

Hi @PsNizza,

Although you can’t override the locale in Postman’s built-in version of Faker, it’s possible to manually re-inject Faker via script, and specify the locale you wish to use. Try the solution from the post below, and see if this helps you:

@PsNizza Welcome to the Community :partying_face:

Just adding to @neilstudd said :blush:

@sean.keegan made a collection here to show case an example using french locale, you can also see this.

I hope this helps :rocket: All the best!! Let us know if you are able to get the dynamic values for your locale :innocent:

1 Like

Hi @neilstudd , @bpricilla

Thanks a lot for your answers, working fine !! (I had seen the post from Dblom, but better with real example :wink:)

Hope one day it will be integrated in Postman (set-up of faker locale), as it is really useful to work with localized data to test local APIs

Best,

2 Likes

Hey @PsNizza! Glad you’re able to get it working! I hope my collection helped somewhat :slight_smile:

A few other folks have requested some things related to the Fakerjs library on our GitHub issues (here’s one in particular). Feel free to join the convo there as well and upvote or create a new issue so our team knows people are asking for it.

2 Likes