ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

write on lang files

September 24, 2014 7:29am

Subscribe [1]
  • #1 / Sep 24, 2014 7:29am

    rulo677

    1 posts

    Hi, I’m using CI for a website and i have a question about the lang files.

    I load the lang files, and i can add the value to the html by ” echo $lang($key)”, i have for example “$lang[‘home’]=‘welcome’;” and i can do a echo of this.
    I can write the lang varible lines and later get it by an echo, but i will not know which variables (lines) i will have.

    I’m doing a website about photo albums, and i want to save their descriptions in lang files,and only save in the ddbb the key ( of lang line).
    I’m doing a cms for to add in the ddbb( album’s title, album id ...) and move the thumbnail uploaded, but i dont know how to add, insert, a new line in my lang files, from a form by a controller.
    I can check, what keys and values i have in lang, by “$this->lang->line($key)”, for example with key=home i get the value. If not exists the key i get “false value”.
    I’m doing for add : “$this->language[$key] = $value;” as i see on https://github.com/EllisLab/CodeIgniter/wiki/MY-Language  but i have errors…

    ¿ What can i do for to add a new line from my controller?¿ and for update the value or delete the line?

    Thanks.
    raul.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases