Comments (5)
You're right, I thought I did my research. The default behavior was overwritten. Thanks for your comments!
from codeigniter4.
You only need to provide values for those messages that would be localized differently for that locale variant. Any missing message definitions will be automatically pulled from the main locale settings.
https://codeigniter4.github.io/CodeIgniter4/outgoing/localization.html#language-fallback
If there is a key in a localized lang file, it will be used.
You set empty strings. So these empty strings are used.
Why is it necessary to fall back?
from codeigniter4.
The reason for the language files with empty strings is because they're put in a Weblate instance used for community translations. These strings remain empty until they are translated by community members.
In CI3, the system would fall back to English even when the strings were empty. I was expecting the same behavior in CI4, hence I thought it was a bug.
from codeigniter4.
In CI3, the system would fall back to English even when the strings were empty.
How to reproduce?
It seems there is no Language Fallback in CI3.
https://www.codeigniter.com/userguide3/libraries/language.html
from codeigniter4.
In CI3, the system would fall back to English even when the strings were empty.
That is not true. The fallback will only occur if the language key in question does not exist.
Another explanation is that you have modified the default behavior in CI3 with the MY_Lang
class.
from codeigniter4.
Related Issues (20)
- Bug: spark routes doesn't work with `(.+)` HOT 2
- Bug: nested $routes->group() with same filter name doesn't work as exepcted HOT 14
- Bug: system/Database/OCI8/Connection.php fails to parse valid DSN HOT 10
- Bug: When Install fresh codeigniter 4 Project I am getting "does not comply with psr-4 autoloading standard" HOT 1
- Bug(OCI8): $validDSNs regex for Oracle service names should support periods HOT 1
- Bug: [QueryBuilder] select() TypeError: trim(): Argument #1 ($string) must be of type string, CodeIgniter\Database\RawSql given HOT 4
- Validation `valid_date` does not work with time HOT 2
- Bug: Auto Routing (Legacy) does not behave like legacy anymore. HOT 9
- Bug: validation level dont work as expected HOT 6
- Bug: Class 'file' not found in SYSTEMPATH\Config\Services.php on line 686. HOT 5
- Bug: `spark phpini:check` TypeError HOT 4
- Bug: ENVIRONMENT is not updated when changed via .ENV ( 4.5.3) HOT 5
- [Feat] Routing: Support to PHP Attributes HOT 4
- Bug: routes not work in ci 4.3.5 HOT 2
- Bug: debug bar content not show with daisyUI ver 4.12.10 HOT 4
- Bug: TypeError in pg_ping() HOT 7
- Add to $filters except urls like in globals HOT 1
- Bug: Module/Config/Registrar.php cause infinite loop in codeigniter4\framework\system\Autoloader\FileLocator.php on line 226
- Bug: Boot Order HOT 3
- Bug: Routing groups and in-group routes use filters that are only effective within the group. 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 codeigniter4.