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: Session FileDriver unlink No such file or directory HOT 1
- feat: Command `lang:find` behavior with parameters
- Bug: Credit card validation does not work with multiple card HOT 1
- Bug: postgre can not connect to database error HOT 12
- `Model::paginate()` behavior when `$page` exceeds the last page HOT 12
- Bug: CodeIgniter v4.5.1 When I connect Postgres Database I Received Error HOT 4
- Bug: [Error] Call to undefined method Config\Mimes::__set_state() at ROOTPATH/writable/cache/FactoriesCache_config HOT 7
- Bug: [DebugBar] Flush a session flash-data when redirect by "Refresh" method HOT 2
- Add required_if validation rules
- Bug: Entity Standalone Class initialization error HOT 2
- Bug: How can I know which browser name is the request from?
- Bug: How can I know which browser name is the request from? HOT 14
- Bug: storing validation rules in Config/Validation causes error HOT 1
- Bug: Fatal error: Uncaught Error: Undefined constant "ENVIRONMENT" in /var/www/html/MyApp/system/Common.php:777 HOT 1
- Bug: cannot run PHPUnit testing in CI 4.5.1 appstarter HOT 5
- "Deploy API Documentation" fails HOT 1
- Bug: Composer PSR-4 notices HOT 6
- Bug: CodeIgniter\Router\RouteCollection::getRoutesOptions(): Argument #1 ($from) must be of type ?string, int given, called in system\Router\DefinedRouteCollector.php on line 49 HOT 1
- Bug: migration:rollback impossible due to argument 1 type HOT 1
- Bug: if_exist is not working as intended with arrays
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.