Welcome Guest, Not a member yet? Register   Sign In
Poll: URI language identifier in core?
You do not have permission to vote in this poll.
yes
52.38%
22 52.38%
no
26.19%
11 26.19%
maybe
21.43%
9 21.43%
Total 42 vote(s) 100%
* You voted for this item. [Show Results]

Add URI Language Identifier to core?
#19

(04-21-2015, 08:23 AM)ivantcholakov Wrote: CLDR - http://cldr.unicode.org - language codes could be taken from there. I did this for the languages that CodeIgniter 3 currently supports - https://github.com/ivantcholakov/starter...g/lang.php

Language URI segment may differ slightly if you wish for aesthetical reasons, it is configurable.

If only one (the default) language is enabled, the framework behaves as it behaves now, without the feature. It is matter of configuration (without touching routes.php in CI3).

So you chose a corporate extension to multiple existing standards, but didn't actually follow the format provided? Examples: Brazilian Portuguese in CLDR is pt_BR, Latin American Spanish is es_419.

Why did you choose to use the identifier for Taiwan in the latter part of the URI segment for Traditional Chinese? Using the U.K. flag for U.S. English is one of my favorite things to see in someone's code when they're commenting on the handling of languages by English-speaking people.

These examples point out some of the issues I see with trying to integrate this into the core. Ideally, the Lang class itself would have better handling of standard language tags. If they could be handled properly by the Lang class, it would be much easier to modify the routing to properly handle language tags.

At that point, the system should be able to handle language tags in any number of formats, preferably with configurable choices between '-', '_', and '/' for the separators used between language tags and subtags as well as configuration of default language choices for the general tags as well as the lack of language tags, since all of these impact the ability to use those language tags with varying standards and extensions (or for use in a URL routing scheme).
Reply


Messages In This Thread
RE: Add URI Language Identifier to core? - by mwhitney - 04-21-2015, 09:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB