customising language string

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm

customising language string

Post by rotezecke »

in V1 I had my language string for extra fields customised. http://docs.cmsmadesimple.org/customizi ... ge-strings The renamed-admin/custom/lang/en_US/admin.inc.php file back then contained:

Code: Select all

$lang['admin']['extra2'] = 'My string';
that does no longer work. I also tried

Code: Select all

$lang['extra2'] = 'My string';
but that doesn't work either (I [manually] cleared cache in between).

Could someone please enlighten me what the correct syntax / procedure is? Thanks.

for the record, I updated from latest 1.12.? to 2.1.4 using phar installer.


----------------------------------------------

Cms Version: 2.1.4

Installed Modules:

AdminSearch: 1.0.1
CGBlog: 1.14
CGExtensions: 1.53.9
CGFeedback: 1.7.6
CGSimpleSmarty: 2.1
CGSmartImage: 1.21.5
CMSContentManager: 1.1
CMSMailer: 6.2.14
Captcha: 0.5.3
DesignManager: 1.1.1
FileManager: 1.5.2
FormBuilder: 0.8.1.4
JQueryTools: 1.3.9
ModuleManager: 2.0.2
Navigator: 1.0.3
News: 2.50.5
Search: 1.50.2


Config Information:

php_memory_limit:
max_upload_size: 2000000
url_rewriting: mod_rewrite
page_extension: .html
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: Australia/Sydney
permissive_smarty: false


Php Information:

phpversion: 5.6.24-0+deb8u1
md5_function: On (True)
json_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_ALL: 22527
E_STRICT: 0
E_DEPRECATED: 0
test_file_timedifference: No time difference found
test_db_timedifference: No time difference found
create_dir_and_file: 1
memory_limit: 128M
max_execution_time: 30
register_globals: Off (False)
output_buffering: 4096
disable_functions: pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority,
open_basedir:
test_remote_url: Success
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 2M
session_save_path: /var/lib/php5/sessions (1733)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
check_ini_set: On (True)
curl: On


Performance Information:

allow_browser_cache: Off (False)
browser_cache_expiry: 0
php_opcache: On (True)
smarty_cache: Off (False)
smarty_compilecheck: Off (False)
smarty_cache_udt: Off (False)
auto_clear_cache_age: On (True)

Server Information:

Server Software: Apache/2.4.10 (Debian)
Server Api: apache2handler
Server Os: Linux 3.16.0-4-686-pae On i686
Server Db Type: MySQL (mysql)
Server Db Version: 5.6.19
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable


Permission Information:

tmp: /var/www/public_html/tmp (0775)
tmp_cache: /var/www/public_html/tmp/cache (0775)
templates_c: /var/www/public_html/tmp/templates_c (0775)
modules: /var/www/public_html/modules (0775)
uploads: /var/www/public_html/uploads (0775)
File Creation Mask (umask): /var/www/public_html/tmp/cache (0775)
config_file: 0444

----------------------------------------------
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: customising language string

Post by calguy1000 »

I just tried this exact step:

Code: Select all

mkdir -p admin/custom/lang
vi admin/custom/lang/en_US.php

Code: Select all

<?php
$lang['extra2'] = 'some funny text';
and had no issues.
That said, in 2.x more things are modules. i.e: CmsContentManager and Designmanager etc. so you may be trying to change the wrong string in the wrong file.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm

Re: customising language string

Post by rotezecke »

Thanks heaps. from the instruction page (link above)
Create a directory named admin/custom/lang/en_US/ (en_US can also be another language)
The language filename is: admin.inc.php
but your (working) example you posted is one level up and has a different name
admin/custom/lang/en_US.php
I dont know who handles documentation but if you happen to read this, could you please update that page. Thanks
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: customising language string

Post by calguy1000 »

I updated the documentation. Thanks.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Locked

Return to “CMSMS Core”