1
yingzhao
developing module language files
  • 2010/6/23 15:53

  • yingzhao

  • Just popping in

  • Posts: 45

  • Since: 2008/5/12


I want to find out the right way to develop module language pak. Here is what I did so far. I created language files for my module.
language/english/main.php,
language/english/modinfo.php,
language/english/cates.php,
language/english/profile.php,
language/english/search.php,

and I defined the language related constants as below.

define('_US_REQUIREVIP','You have to be VIP to perform the operation');

and in language/english/main.php I also have the following includes

include_once 'cates.php';
include_once 'search.php';
include_once 'profile.php';

This English pak works fine. However, after I translated the constants into Simplified Chinese. The constants are changed into Chinese. However, the UI style is broken. So I wondering what is the right way of moving the language constants into language files, and modifying the corresponding code to point to these language files. Thank you.


2
ghia
Re: developing module language files
  • 2010/6/23 17:07

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


If you see Chinese everywhere as expected, then your language files are working.

If you mean that with the broken UI style, that the layout is different, then you should adapt the layout for the Chinese case.
English is very compact. In general foreign languages take 150% of the place as the same wording in English. So, provide enough room.

Quote:
and I defined the language related constants as below.
define('_US_REQUIREVIP','You have to be VIP to perform the operation');
You should add a (4 letter) abbreviation of your module name in the constants' name eg _MYMOD_US_REQUIREVIP to avoid name collisions with other files.

Login

Who's Online

164 user(s) are online (116 user(s) are browsing Support Forums)


Members: 0


Guests: 164


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits