We have moved to Github. Please open tickets there.

Opened 2 years ago

Last modified 19 months ago

#3083 new Defect

Break up main language file into manageable files

Reported by: brettp Owned by:
Priority: low Milestone: Long Term Future Release
Component: Core Version: 1.7
Severity: annoying Keywords:
Cc: brett@… Difficulty: easy

Description

I hate trying to go through 1300 lines of strings to find one that I need to change. Let's separate this out into something like:

languages/en/core.php
languages/en/admin.php
languages/en/navigation.php

And then use languages/en.php to include all of those files.

Change History (4)

comment:1 Changed 2 years ago by brettp

  • Summary changed from Break up main language file into manageable sections to Break up main language file into manageable files

comment:2 Changed 2 years ago by cash

  • Milestone changed from Needs Review to Future Release

comment:3 Changed 23 months ago by ewinslow

I really like what laravel does: when you break up strings into separate files, they are all automatically prefixed with the name of that file.

http://docs.laravel.com/views/localization

We could do the same: E.g. languages/en/river.php could prefix the strings with "river:". Saves lots of redundancy and forces some rhyme/reason as to which strings are put in which files.

You could even support further nesting. I.e., languages/en/river/example.php would prefix all strings returned by example.php with "river:example:".

Requires #3682

comment:4 Changed 19 months ago by ismayil.khayredinov

Can't language strings be context dependant? Potentially, could language files be loaded similar to 1.8 JS/CSS?

Note: See TracTickets for help on using tickets.