问题描述
场景:该应用检查浏览器语言并根据浏览器语言使用翻译。为此,我使用了类似的代码
CREATE OR REPLACE FUNCTION sp_post_items(i_data json)
RETURNS table (fulfiller_id text,item_id text,order_id text,status_id integer,item_updated_time timestamp)
AS $function$
insert into vw_item_status_detail
(fulfiller_id,item_id,order_id,status_id,sku_code,decoration_technology,quantity,item_updated_time)
select
i_data->>'fulfillerId',t->>'itemId',i_data->>'orderId',1000,t->>'skuCode',t->>'decorationTechnology',10,Now()
from json_array_elements(i_data -> 'items') t
returning fulfiller_id,item_updated_time;
$function$
LANGUAGE sql;
在这里,我同时使用CREATE OR REPLACE FUNCTION testFn()
RETURNS table (name text,updated_time timestamp without time zone ) AS
$$
insert into "user" (name,updated_time)
select 'alex',Now()
union
select 'alex2',Now()
returning name,updated_time;
$$ LANGUAGE sql;
作为后备广告和let language = this.translate.getbrowserCultureLang().toLowerCase();
this.translate.setDefaultLang('en');
this.translate.use(language); // language is en-us for my system
。在资产文件夹中,我只有一个文件是en.json文件。但是,它会查找en-us.json(不存在)并回退到en.json并且可以正常工作。但是问题是,我在网络选项卡中找不到404文件,说找不到en-us.json。
我只想检查lang文件是否存在,并回退到en.json特定文件,而不会出现404错误。任何线索将不胜感激。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)