Comments (2)
It uses the culture, but doesn't have a lot of translations present for Japanese.
using System;
using System.Globalization;
using Humanizer;
using Humanizer.Localisation;
public class Program
{
public static void Main()
{
var timeUnit = TimeUnit.Week;
Console.WriteLine(timeUnit.ToSymbol());
Console.WriteLine(timeUnit.ToSymbol(CultureInfo.GetCultureInfo("ja")));
Console.WriteLine(timeUnit.ToSymbol(CultureInfo.GetCultureInfo("es")));
Console.WriteLine(timeUnit.ToSymbol(CultureInfo.GetCultureInfo("de")));
}
}
with the current Humanizer release outputs
week
week
semana
Woche
If you feel like it, you could add them to https://github.com/Humanizr/Humanizer/blob/23c4c2a526deb0f101b39fe060fca66f5e66c823/src/Humanizer/Properties/Resources.ja.resx based on the resource file for English: https://github.com/Humanizr/Humanizer/blob/1bdd7a1bad03fd001d04fc0e252d279b4e785818/src/Humanizer/Properties/Resources.resx#L714C1-L737
If you do so, it would be great if you could add some tests, for example based on https://github.com/Humanizr/Humanizer/blob/689802b55f94ccb8e4e8d33b121f36b85d9e7108/src/Humanizer.Tests.Shared/Localisation/de/TimeUnitToSymbolTests.cs, too. :)
from humanizer.
OK I understand, I tried with few other languages and all of them don't have the translation.
I'll add the ones I know thanks.
from humanizer.
Related Issues (20)
- Is the project abandoned? HOT 7
- [Question] Use within blazor app
- Chinese Simplified translation error
- ByteSize should include petabyte, exabyte, etc.
- Humanizing a DateTime using calendar app format HOT 1
- DateTimeOffset.Humanize(culture: newCulture) doesn't emit translated text HOT 2
- Compilation fails on the very latest Visual Studios due to character-encoding problem
- Unexpected response
- Problematic words
- Humanizer.Core.fil-PH is not compatible with netstandard2.0
- Moving to the new .NET Foundation CLA service HOT 1
- How can we check if provided culture is supported?
- To.TitleCase does not capitalize conjunction words
- Persian Language request HOT 2
- CultureNotFoundException MalteseFormatter HOT 1
- Titlize removes decimal point HOT 3
- Request: Collection.Humanize(Culture culture) instead of defaulting
- Missing DateHumanize_Never for Resources.zh-CN.resx
- Humanize size, e.g. 1280x720 => "HD", 850x480 => "SD" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from humanizer.