Skip to content

Slang does generate the source #3

@soernt-poppe

Description

@soernt-poppe

Slang does not generate the source, I don't see any error messages related to the source generation.

My setup:

localization.json:

{
  "base_culture": "de-DE"
}

AppLocalization.cs

[Translations(InputFileName = "locals")]
public partial class AppLocalization
{   
}

locals_de-DE.i18n.json

{
  "Shared": {
    "Menu": {
      "Titel": "Menü",
      "Items": {
        "Home": "Home",
        "AboutMe": "Über mich",
        "Services": "Services",
        "ServicesProjects": "Projekte",
        "Contact": "Kontakt"
      }
    },
    "Footer": {
      "Impress": "Impressum & Datenschutz"
    }
  }
}

locals_en-GB.i18n.json

{
  "Shared": {
    "Menu": {
      "Titel": "Menu",
      "Items": {
        "Home": "Home",
        "AboutMe": "About Me",
        "Services": "Services",
        "ServicesProjects": "Projects",
        "Contact": "Contact"
      }
    },
    "Footer": {
      "Impress": "Imprint & Privacy Policy"
    }
  }
}

The Project file contains these relevant elements:

  <ItemGroup>
    <AdditionalFiles Include="**\*.i18n.json" />
    <AdditionalFiles Include="Features\Core\Localization\localization.json"/>
  </ItemGroup>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions