Commit graph

31 commits

Author SHA1 Message Date
nicolas.dorier
918d3b46f0
The checkout would crash for some client if automatic detection of language was checked, and the browser was not setting the accepted language 2021-08-31 16:01:16 +09:00
Nicolas Dorier
6ea96efe68
Update NBitcoin, fix warnings on nullable (#2718) 2021-07-29 20:29:34 +09:00
Wouter Samaey
d8c1c51a21
Auto-detect language on payment page (#2552)
* Auto-detect language on payment page

based on the requst Accept-Language header, which is the language you configured in your browser/OS and this 99.99% accurate

* Update BTCPayServer/Services/LanguageService.cs

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>

* Update BTCPayServer/Services/LanguageService.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Update BTCPayServer/Services/LanguageService.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Update BTCPayServer/Services/LanguageService.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Added loop for all locales in Accept-Language sorted by weight + check if know this language

* New public method so a unit test can be created for it

* Unit test for language detection

* Fix language service when not in browser context

* fall back to default lang

* Auto-detect setting + ?lang=auto support

* Added invoice param "?lang=auto" info to docs

* Using null-coalescing assignment operator

* Reduce complexity and http dependency in language service

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2021-07-27 08:17:56 +02:00
Nicolas Dorier
4bb3d60b6c
Add misc/permissions to document the hierarchical structure (#2654) 2021-07-08 14:34:10 +09:00
nicolas.dorier
798cf66e3f
Add checkoutLink and defaultLanguage to GreenField invoice 2020-12-11 12:04:18 +09:00
rockstardev
f88c02cccd Removing unused usings, readonly fields where possible 2020-06-28 22:07:48 -05:00
rockstardev
b6c7af32de Cleaning up bom from cs files 2020-06-28 21:44:35 -05:00
nicolas.dorier
51514252b6
Run dotnet format 2020-06-28 17:55:27 +09:00
nicolas.dorier
629dfcf152
Cleanup netcore21 specific code 2020-01-12 13:30:54 +09:00
nicolas.dorier
a919d3ddec
Move TryGetSolutionDirectoryInfo in test utils 2019-10-06 23:38:57 +09:00
nicolas.dorier
aaa05eb5ec
Fix build 2019-10-03 17:37:10 +09:00
nicolas.dorier
4d84343a80
Prepare BTCPayServer for .netcore 3.0 2019-10-03 17:06:49 +09:00
nicolas.dorier
4af5b94013 Add tooling which pull transifex translation automatically, add Slovenčina. (Close #386) 2018-11-14 16:48:25 +09:00
Andrew Camilleri
f23e2a3ec4 async i18n and json translation format (#369)
* start working on loading locales async and as json

* finish off langs and UI

* fix path

* fix tests
2018-11-09 16:48:38 +09:00
britttttk
1ff0a98d30 Adding Ukrainian Translation (#352) 2018-10-24 15:18:31 +09:00
britttttk
f0efd52cb7 Adding Kazakh Language (#350) 2018-10-24 15:17:09 +09:00
britttttk
bb8fa88688 Adding Vietnamese (#351) 2018-10-24 15:16:30 +09:00
Denny Biasiolli
a4fbb2de7e creating italian localization file (#310) 2018-10-14 21:34:15 +09:00
britttttk
9bec38559f Nepali Translation (#311)
* Nepali Language

* Delete Checkout.cshtml

* Delete LanguageService.cs

* add np.js

* Match Language File Style
2018-10-12 10:11:03 +09:00
britttttk
b3c4fc4003 Added Russian (#312) 2018-10-12 10:10:20 +09:00
Sosthene
60707fdbd1 Add simplified chinese translation (#326)
* Add Chinese Simplified translation

* Add Chinese simplified translation
2018-10-11 14:25:16 +09:00
2pac1
a6ef7387cf
Update LanguageService.cs 2018-04-28 18:12:11 +02:00
Mário
d7719d25b4 Add Portuguese (Portugal) translation 2018-04-16 01:29:42 +01:00
Saevar
2e555cac22 Add Icelandic 2018-03-29 08:19:07 +00:00
Pavel Ševčík
56d1d3e645 Czech language support 2018-03-25 17:17:38 +02:00
nicolas.dorier
f533309b49 plug japanese translation 2018-03-24 23:02:41 +09:00
nicolas.dorier
a0d2790491 Activate spanish 2018-03-24 14:35:49 +09:00
nicolas.dorier
08d82390b0 Remove language not yet translated 2018-03-24 01:15:28 +09:00
nicolas.dorier
b845a545e2 Plug Dutch to LanguageService 2018-03-24 01:10:19 +09:00
nicolas.dorier
7266420eec Plug portugeuse to language service 2018-03-24 01:04:05 +09:00
nicolas.dorier
7d17bf7f2a Can set store default language 2018-03-23 17:27:48 +09:00