Skip to content

generalize vrm for locale-specific registration formats #3942

Description

@ydj515

Clear and concise description of the problem

As a developer using Faker, I’d like faker.vehicle.vrm() to support locale-specific vehicle registration formats so that localized Faker instances can generate more realistic registration numbers.

At the moment, vehicle.vrm() appears to assume a UK-style format. That makes it difficult to represent formats such as Korean 00가0000 / 000가0000, and it does not scale well to locales with different registration rules.

If this proposal sounds reasonable, I’d be happy to submit a PR.

Suggested solution

A possible approach would be to keep faker.vehicle.vrm() as the public API, but make its implementation locale-aware and data-driven.

In practice, this could mean:

  • allowing locales to define VRM-specific patterns and symbol sets
  • using those patterns to generate locale-specific registration numbers
  • preserving the current UK-style generation as a fallback when no locale-specific VRM data is available

This would make it possible to support formats like Korean ##<symbol>#### and ###<symbol>#### without adding one-off runtime logic for each locale.

Alternative

Another option would be to introduce a new method such as faker.vehicle.licensePlate() and keep vrm() as the current UK-style generator.

That would make the naming more general, but it would also add another API for a closely related concept.

Additional context

A few constraints seem important here:

  • no breaking change for existing locales
  • deterministic output using Faker’s current randomizer
  • locale data should be able to describe full registration formats, not just a single character list

A reasonable first step could be to preserve the current fallback behavior, add ko support, and introduce a structure that could later be reused by other locales.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: featureRequest for new featurem: vehicleSomething is referring to the vehicle modulep: 1-normalNothing urgents: waiting for user interestWaiting for more users interested in this feature

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions