Copyright © 2010 Marc Worrell Date: 2010-05-18
Behaviours: gen_server.
Authors: Marc Worrell (marc@worrell.nl).
code_change/3 | Convert process state when code is changed. |
handle_call/3 | Return the id of the current translation table. |
handle_cast/2 | Rebuild the translations table. |
handle_info/2 | Handling all non call/cast messages. |
init/1 | Initiates the server. |
load_translations/1 | Parse all .po files and reload the found translations in the trans server. |
load_translations/2 | Take a proplist with dicts and reload the translations table. |
set_context_table/1 | Set the table id in the context to the newest table id. |
start_link/1 | Starts the server. |
start_tests/0 | |
table/1 | Return the name of the ets table holding all translations. |
terminate/2 | This function is called by a gen_server when it is about to terminate. |
code_change(OldVsn, State, Extra) -> {ok, NewState}
Convert process state when code is changed
handle_call(Message::Request, From, State) -> {reply, Reply, State} | {reply, Reply, State, Timeout} | {noreply, State} | {noreply, State, Timeout} | {stop, Reason, Reply, State} | {stop, Reason, State}
Return the id of the current translation table
handle_cast(Message::Msg, State) -> {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}
Rebuild the translations table. Call the template flush routines afterwards. Trans is a dict with all translations per translatable string.
handle_info(Info, State) -> {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}
Handling all non call/cast messages
init(Opts::Args) -> {ok, State} | {ok, State, Timeout} | ignore | {stop, Reason}
Initiates the server.
load_translations(Context) -> any()
Parse all .po files and reload the found translations in the trans server
load_translations(Trans, Context) -> any()
Take a proplist with dicts and reload the translations table. After reloading the the template server is flushed.
set_context_table(Context) -> any()
Set the table id in the context to the newest table id
start_link(SiteProps) -> {ok, Pid} | ignore | {error, Error}
Starts the server
start_tests() -> any()
table(Host) -> any()
Return the name of the ets table holding all translations
terminate(Reason, State) -> void()
This function is called by a gen_server when it is about to terminate. It should be the opposite of Module:init/1 and do any necessary cleaning up. When it returns, the gen_server terminates with Reason. The return value is ignored.
Generated by EDoc, Feb 25 2011, 21:14:42.