faker icon indicating copy to clipboard operation
faker copied to clipboard

deprecate locale switching during runtime

Open xDivisionByZerox opened this issue 3 years ago • 2 comments

Clear and concise description of the problem

I don't see a use case where you wouldn't be able to instantiate a new faker instance with your desired locale and instead need the utility to change an instance's locale during runtime.

Dropping this feature allows some easier separation of concern handling and thus leading to a cleaner architecture for the library.

Suggested solution

Deprecate (and later remove) the public accessibility of:

  • faker.locale
  • faker.locales
  • faker.localeFallback
  • faker.setLocal()

Alternative

No response

Additional context

There is a poll for dropping the feature of switching locales during runtime.

xDivisionByZerox avatar Jun 10 '22 23:06 xDivisionByZerox

This needs to be done together with e.g. #642, because with out that, it's nearly impossible to build own Faker instances.

Shinigami92 avatar Jun 11 '22 13:06 Shinigami92

IMO its more like a precondition.

ST-DDT avatar Jun 11 '22 14:06 ST-DDT

Superseded by #1340

ST-DDT avatar Sep 06 '22 20:09 ST-DDT