nolazybits / angular-i18n Goto Github PK
View Code? Open in Web Editor NEWAngularJS internationalization (i18n) and localization (l10n) module
AngularJS internationalization (i18n) and localization (l10n) module
Readme file doesn't mention the need to include the sprintf file to the application. It should mention that and the library itself maybe shouldn't be included in this project, but should be linked using bower:
"dependencies": { "sprintf.js": "https://github.com/alexei/sprintf.js.git" }
Please enhance the readme to simplify the process of using your lib. Thx. I enjoy it.
Hey there,
I'm interested in using this. But I'm not keen for it to make an XHR request to retrieve the localization file though, as I'm building a mobile/cordova app.
I'm using RequireJS and Grunt to create my production build .js file. If my build process appends the correct localisation file (say, en-US.js), is there a way we could have this refer to that file?
I'm thinking the same way https://github.com/ericclemmons/grunt-angular-templates can bundle templates directly into the $templateCache, so the template thing in Angular will fetch from the cache rather than making the XHR request.
What do you think? I'm pretty new to AngularJS and don't know the best way to do things.
<
Hey @zeflasher maybe you're interested in helping out on making angular-translate (http://pascalprecht.github.io/angular-translate) better, so it becomes the defacto angular i18n module?
I like what you did with angularjs-i18n. Maybe there's something we could put into angular-translate's source?
Hello, and thank you for this great library.
Unfortunately, when i put something like this in my template :
{{'home.link'|i18n}}
"home.link" is rendered...
In my json files i have :
[{"home.link" : "Home !!!!!"}]
Do you know how can i solve it ?
Thank you very much.
The default configuration for this module looks for files of the format "/i18n/|LANG||PART|.json"_.
Since allowPartialFileLoading is disabled by default, it looks for a file named "/i18n/en-US|PART|.json"_ which seems silly to me.
I propose setting the default value for fileURL to be '/i18n/|LANG|.json'. Looking at the readme definition for the fileURL option, it looks like this used to be the default.
I'd be happy to submit a PR. let me know what you think!
Right now the fallback object is a flat object.
If the user decides to use partial loading (ie section, and want to have same key name in those section) this should be supported by the fallback object.
So if allowPartialLoading is true, and a section is passed, we should check in the fallback object like
_this.fallback[section][id]
We should have an option to display / hightlight untranslated IDs.
eg:
$i18nProvider.showUntranslated = function(lang, value, section, placeholders): string
{
return <string>
}
this function (if set) will be called when no translation are found.
There isn't a how to use angularjs-i18n?
I'm new to angular and I don't know how to use it in my application.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.