Skip to content

Configurable locale for faker strategy #10

Description

@cl8dep

Summary

The faker strategy uses the Bogus library hardcoded to English locale (new Faker("en")). There is no way to generate locale-appropriate fake data such as Spanish names, German addresses, or French phone numbers.

Current Limitation

FakerStrategy.cs line 13:

private static readonly Faker _faker = new("en");

Proposed Approach

Add a global and per-table locale config:

sanitize:
  faker_locale: "es"   # global default, e.g. "es", "de", "fr", "pt_BR"

  - table: "users"
    faker_locale: "de"  # table-level override
    columns:
      - name: "first_name"
        strategy: "faker"
        faker: "first_name"

Bogus supports ~60 locales. The locale string should be validated against supported Bogus locales during validate.

Acceptance Criteria

  • faker_locale is configurable at the top-level sanitize block
  • Per-table faker_locale overrides the global value
  • Default remains "en" when not set
  • validate checks the locale string against supported Bogus locales
  • Invalid locale produces a clear error message listing available options

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions