Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language abbreviations in Translate Behaviour #3352

Merged
merged 3 commits into from
Oct 5, 2015
Merged

Language abbreviations in Translate Behaviour #3352

merged 3 commits into from
Oct 5, 2015

Conversation

Redrocirt
Copy link

I suggest to update the examples in the book chapter about the Translate Behaviour to use the same language abbreviations as in the chapter Internationalization and Localization thus it is consistent.

As I'm new to GitHub please have a closer look if the changes are done correctly. I don't know how to set a link to the chapter "Internationalization and Localization" so maybe someone want to add it in the new text snippet about the language abbreviations? Thanks.

Oops D'oh added 2 commits October 4, 2015 13:46
Updated language abbreviations in the examples to be consistent with the chapter Internationalization and Localization. I18n::locale('spa'); should be I18n::locale('es'); or I18n::locale('es_ES');
@markstory markstory added this to the 3.x milestone Oct 4, 2015
$data = $this->Articles->find('list')->toArray();

// Data will contain
[1 => 'Mi primer artículo', 2 => 'El segundo artículo', 15 => 'Otro articulo' ...]

It's recommended to use the same language abbreviations as required for Internationalization and Localization: Either the two letter ISO code of the language like ``en``, ``fr``, ``de`` or the full locale name such as ``fr_FR``, ``es_AR``, ``da_DK`` which contains both the language and the country where it is spoken. Thus you are consistent and switching the language works identical for both, the Translate Behaviour and Internationalization and Localization.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps link to the other section? To create a link use

:doc:`filepath`

lorenzo added a commit that referenced this pull request Oct 5, 2015
Language abbreviations in Translate Behaviour
@lorenzo lorenzo merged commit 9723bdf into cakephp:3.0 Oct 5, 2015
@Redrocirt Redrocirt deleted the patch-1 branch October 5, 2015 15:27
cake17 added a commit that referenced this pull request Oct 6, 2015
antograssiot added a commit that referenced this pull request Oct 6, 2015
markstory added a commit that referenced this pull request Oct 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants