[drupal-devel] Internationalization, Usability and changes in the coding conventions

Negyesi Karoly karoly at negyesi.net
Sat Feb 19 18:26:48 UTC 2005


Maybe my head is just a brick, but I fail to understand how this will help.

Could you please explain to us how would the translation process work in 
this case? 

Regards

Karoly Negyesi

On Saturday 19 February 2005 19.15, Carl McDade wrote:
>   There should be an effort to externalize all english text into default
> variables. It makes a great step towards true internatiolization. Does
> not cost anything in terms of performance or matainance. What it does do
> is make the code that uses hard coded strings open and more resuable. It
> adds the flexibility in phrasology that is necessary in
> internationalizing Drupal. It creates more usability in that better text
> instructions can be delivered to the user based on the situation of the
> process. I have made this slight change in my install which allows me to
> give a descriptive message based on the url tried. This can be done in
> both english and swedish without me having to use gettext and the like
>
> I also feel that this should be added to the coding conventions so that
> Drupal code will keep moving forward into internationalization and need
> less "fixing" inorder for it to happen properly.
>
>
> I have created an issue and patch on this but I thought it should be
> addresses directly as many will be branching their code for v4.6 and
> this should be part of that.
>
> --- common_1.inc    2005-02-19 17:33:21.451910400 +0100
> +++ common_2.inc    2005-02-19 17:34:40.876116800 +0100
> @@ -427,8 +427,8 @@ function object2array($object) {
>   * Always consider whether to use drupal_access_denied() instead to
> return a
>   * proper (and customizable) 403 error.
>   */
> -function message_access() {
> -  return t('You are not authorized to access this page.');
> +function message_access($message = 'You are not authorized to access
> this page.') {
> +  return t($message);
> }



More information about the drupal-devel mailing list