Abp localization

From burakdmir/abp-skills · View interactive version

Abp localization is an AI agent skill from the GitHub repository burakdmir/abp-skills. ABP Framework v10.x (10.4–10.6) localization: localization resource, JSON files, culture fallback, L[] helper, IStringLocalizer. Use for multi-language, localization, or translation in ABP.

How to use this skill

Skill file

ABP Localization Skill

Trigger

Localization, i18n, localization resources, JSON files, culture, L[] helper, multi-language, text translation.


Quick Reference

Create Resource

public class BookStoreResource { }

Register Resource

Configure<AbpVirtualFileSystemOptions>(options =>
{
    options.FileSets.AddEmbedded<MyModule>("YourRootNamespace");
});
Configure<AbpLocalizationOptions>(options =>
{
    options.Resources.Add<BookStoreResource>("en")
        .AddVirtualJson("/Localization/Resources/BookStore");
});

JSON File

{
  "culture": "en",
  "texts": {
    "HelloWorld": "Hello World!",
    "Menu:Home": "Home",
    "Hello": { "World": "Hello World!" }
  }
}

Usage

// In ApplicationService
LocalizationResource = typeof(BookStoreResource);
var text = L["HelloWorld"];

// Via DI
private readonly IStringLocalizer<BookStoreResource> _localizer;
var text = _localizer["HelloWorld"];

Multiple Files per Culture

Localization/MyResource/
├── en.json
├── en_Authors.json
├── en_Books.json
└── en_Users.json

Auto-merged. Split large modules by feature.

Best Practices

Related

Exception Handling · UI · Settings & Features · Docs: https://abp.io/docs/latest/framework/fundamentals/localization

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.