agentic-net-examples / globalization-and-localization
AGENTS.md1 starsChanged 29 days agoMITView on GitHub
Create deterministic, culture-aware Aspose.Cells for .NET examples for localized numbers, dates, calendars, formulas, Boolean/error labels, subtotal/pivot labels, chart text, and regional workbook behavior. Follow ../AGENTS.md. Use format-cells when only a format string changes, and manage-formulas when formula structure rather than language/culture is primary. When culture must influence workbook parsing or rendering, configure the documented workbook/load setting rather than creating an unused CultureInfo object. Each example must identify locale, input representation, stored type, display/formula behavior, output, and expected localized result. Metadata…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,337 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository32 other files it gives its agents.
- Aspose.Cells for .NET Product AgentAGENTS.md
- calculate-formulas/AGENTS.mdAGENTS.md
- cells-data/AGENTS.mdAGENTS.md
- comments-and-notes/AGENTS.mdAGENTS.md
- conversion/AGENTS.mdAGENTS.md
- document-properties/AGENTS.mdAGENTS.md
- encryption-and-protection/AGENTS.mdAGENTS.md
- format-cells/AGENTS.mdAGENTS.md
- macro-project/AGENTS.mdAGENTS.md
- manage-formulas/AGENTS.mdAGENTS.md
- manage-workbook/AGENTS.mdAGENTS.md
- managing-ranges/AGENTS.mdAGENTS.md
- open-workbook/AGENTS.mdAGENTS.md
- pivot-table/AGENTS.mdAGENTS.md
- queries-and-connections/AGENTS.mdAGENTS.md
- rows-and-columns/AGENTS.mdAGENTS.md
- save-workbook/AGENTS.mdAGENTS.md
- slicer/AGENTS.mdAGENTS.md
- smart-markers/AGENTS.mdAGENTS.md
- sparkline/AGENTS.mdAGENTS.md
- timeline/AGENTS.mdAGENTS.md
- workbook-merger/AGENTS.mdAGENTS.md
- working-with-charts/AGENTS.mdAGENTS.md
- working-with-html/AGENTS.mdAGENTS.md
- working-with-images/AGENTS.mdAGENTS.md
- working-with-json/AGENTS.mdAGENTS.md
- working-with-pdf/AGENTS.mdAGENTS.md
- working-with-shapes/AGENTS.mdAGENTS.md
- working-with-tables/AGENTS.mdAGENTS.md
- working-with-worksheets/AGENTS.mdAGENTS.md
- xml-maps/AGENTS.mdAGENTS.md
- llms.txtllms.txt
The file
We split this AGENTS.md into the rules it gives an agent
9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
Create deterministic, culture-aware Aspose.Cells for .NET examples for localized numbers, dates, calendars, formulas, Boolean/error labels, …
- Very specific: line 21
Use format-cells when only a format string changes, and manage-formulas when formula structure rather than language/culture is primary.
- Distinctive: line 38
Keep invariant formula syntax and localized formula syntax distinct.
- Distinctive: line 40
Use valid BCP 47/.NET culture identifiers and deterministic dates away from ambiguous boundaries unless testing boundaries.
- Distinctive: line 42
Do not claim that changing culture translates arbitrary workbook text.
- Very specific: line 61
When culture must influence workbook parsing or rendering, configure the documented workbook/load setting rather than creating an unused …
- Distinctive: line 67
Keep mappings case-aware according to Excel semantics.
- Distinctive: line 68
Never perform network calls or workbook mutation inside localization callbacks.
- Very specific: line 77
Test under an explicitly configured culture, compare typed values separately from display text, save/reopen, and render when visual labels …
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Globalization and Localization Agent Instructions
Mission and scope
Create deterministic, culture-aware Aspose.Cells for .NET examples for localized numbers, dates, calendars, formulas, Boolean/error labels, subtotal/pivot labels, chart text, and regional workbook behavior. Follow ../AGENTS.md.
Use format-cells when only a format string changes, and manage-formulas when formula structure rather than language/culture is primary.
Canonical model
| Concern | Preferred mechanism |
| Parse/load with a culture | Version-supported LoadOptions culture/region settings |
| Workbook region | Workbook.Settings.Region or package-supported culture setting |
| Custom labels/function names | Derive from GlobalizationSettings and override documented members |
| Localized formula text | Cell.FormulaLocal when appropriate and supported |
| Culture-specific display | Typed values plus Style.Custom/number formats |
| Japanese era/calendar | Explicit CultureInfo/calendar APIs and verified Aspose helpers |
Hard rules
- Set culture explicitly; never rely on the developer machine's current culture.
- Store dates and numbers as typed values, not preformatted localized strings, unless parsing text is the objective.
- Keep invariant formula syntax and localized formula syntax distinct.
- Save and restore thread culture if an example changes it.
- Use valid BCP 47/.NET culture identifiers and deterministic dates away from ambiguous boundaries unless testing boundaries.
- Explain whether localization affects stored values, display formats, formula names, or rendered labels.
- Do not claim that changing culture translates arbitrary workbook text.
Canonical culture-safe pattern
CultureInfo culture = CultureInfo.GetCultureInfo("fr-FR");
Workbook workbook = new Workbook();
workbook.Settings.CultureInfo = culture;
Worksheet worksheet = workbook.Worksheets[0];
worksheet.Cells["A1"].PutValue(new DateTime(2026, 6, 29));
Style style = worksheet.Cells["A1"].GetStyle();
style.Custom = "dd mmmm yyyy";
worksheet.Cells["A1"].SetStyle(style);
workbook.Save("localized-workbook.xlsx");
Console.WriteLine(culture.Name);When culture must influence workbook parsing or rendering, configure the documented workbook/load setting rather than creating an unused CultureInfo object.
Custom globalization settings
- Override only documented methods needed by the scenario.
- Provide a deterministic fallback for unknown labels or functions.
- Keep mappings case-aware according to Excel semantics.
- Never perform network calls or workbook mutation inside localization callbacks.
- Unit-test each locale mapping and fallback.
Example contract
Each example must identify locale, input representation, stored type, display/formula behavior, output, and expected localized result. Metadata and opening comments must use canonical locale identifiers. Prefer filenames such as load-excel-with-french-culture.cs.
Validation and discoverability
Test under an explicitly configured culture, compare typed values separately from display text, save/reopen, and render when visual labels are claimed. Restore global/thread state in finally.
Target one intent such as "format Excel dates for French culture" or "localize Excel formula names in C#." Reject examples that depend silently on installed Excel language packs, compare culture-sensitive strings without a declared culture, or alter process-wide culture without cleanup.
Related knowledge
- Category overview
- Cell formatting
- Formula management
- Official globalization documentation
Definition of done
The example is done when locale, stored value, display/formula effect, fallback behavior, process-state cleanup, and expected output are explicit and verified.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

